Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CDSA reps to see their SignedAgreement detail view #614

Merged
merged 35 commits into from
Jun 24, 2024

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Jun 19, 2024

  • Allow the representative of an application to access the signed agreement Detail view for that agreement.
  • Add a field to SignedAgreement that tracks accessors covered under the application (even if they haven't linked their accounts).
  • Add a field to DataAffiliateAgreement that tracks uploaders for that agreement (even if they haven't linked their accounts).
  • Add form(s)/view(s) to edit signed agreement accessors and uploaders (staff edit only)
  • Show the list of covered users, whether they have a linked account, and whether htey are in the access group on the signed agreement detail page.
  • Add a view to audit CDSA access group membership using the previous field.
  • Add a view to audit CDSA uploaders using the previous field.
  • Also allow anyone covered under the CDSA information to see the same views as the PI.
  • Add to user profile

amstilp added 4 commits June 18, 2024 15:46
Add a field to SignedAgreement to track accessors for that CDSA.
Change the related name for the representative to a non-default
value, since there are now two foreign keys to the User model.
For Data Affiliate Agreements, also add an uploaders field to
track uploaders associated with that agreement.
Add a new viewmixin that controls access to CDSA detail pages. It
grants permission to the represenrative of the CDSA, any named
accessors or named uploaders to see the detail view for their
CDSA. Use the view mixin in the MemberAgreementDetail view, the
DataAffiliateDetail view, and the NonDataAffiliateDetail view.
Modify the information shown to users who are not CC staff by
removing links to pages they can't access and hiding some dates.
For a given CDSA, show the list of accessors (and uploaders if
applicable) on the Detail view for that signed agreement.
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 99.91783% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.98%. Comparing base (175ef59) to head (e87096a).

Files Patch % Lines
primed/cdsa/views.py 98.97% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #614      +/-   ##
==========================================
+ Coverage   98.83%   98.98%   +0.15%     
==========================================
  Files         307      321      +14     
  Lines       25838    29839    +4001     
==========================================
+ Hits        25536    29537    +4001     
  Misses        302      302              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

amstilp added 25 commits June 20, 2024 10:02
Since we'll be adding a view to update accessors/uploaders, split
the status update view into a new "update" namespace. Then we can
have update:status and update:accessors.
Add views to update accessors for all SignedAgreements, as well as
uploaders for DataAffiliateAgreements. Add tests.
Add links to the views that update SignedAgremeent accessors or
uploaders on the Detail page for the signed agreements.
The DataAffiliateAgreement object already exists, so there is no
need to pass the SignedAgreement as a field to it.
Separate the signed agremeent audit namespace into one for SAG
(sharing agreement group audit). This is so we can add a separate
accessors and maybe uploaders audit later.
This helps show the audit behavior.
Also add tests. Right now, the audit does not display an action
because we haven't written that view yet.
This gives the user a name, which is displayed on some pages.
Split the audit explanation into its own template, and include it
in the template for both the audit view and the resolve view.
Add the action button to the accessor audit table. Also add a template
for this action button that can swap its div using htmx upon success.
Typically we require the min valeu to be 1 in the model definitions,
so set it in the factories.
Specifically, the AuditResults classes and the AuditTable classes.
amstilp added 6 commits June 21, 2024 17:05
The user profile showed a duplicate of the data access mechanism
in some cases due to joining with a many-to-many field. Fix this
by adding the distinct() call to the queryset filtering and then
add tests to check for this behavior.
@amstilp amstilp marked this pull request as ready for review June 24, 2024 22:16
@amstilp amstilp merged commit bc1d927 into main Jun 24, 2024
11 checks passed
@amstilp amstilp deleted the feature/cdsa-views-for-investigators branch June 24, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant