-
Notifications
You must be signed in to change notification settings - Fork 0
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
dbGaP application views for PIs #599
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a mixin that checks if the user has Staff View permission or is the PI of the application in question. Update the context and template to show links based on permission level.
As part of this update, rework the new view mixin to require views to implement a "get_dbgap_application" method. This method already existed for dbaPDataAccessSnapshotDetail; I had to add it for the dbGaPApplicationDetail view. Note that database queries are not optimized here, so many of the views are making multiple queries for the same object.
Since the viewmixin sets self.dbgap_application, we can use that attribute in the view without having to make additional database queries.
Rework the url and view such that both the dbgap_application and the DAR id are required. This should be unnecessary (e.g., a DAR id is only associated with a single dbGaP application at dbGaP), but it's a little safer and it's easier to check if the user has permission to see the page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #599 +/- ##
==========================================
+ Coverage 98.73% 98.83% +0.09%
==========================================
Files 300 307 +7
Lines 23850 25838 +1988
==========================================
+ Hits 23549 25536 +1987
- Misses 301 302 +1 ☔ View full report in Codecov by Sentry. |
amstilp
changed the title
dbGaP application views for pis
dbGaP application views for PIs
Jun 7, 2024
This field allows the CC to set the collaborators for a dbGaP Application, even if the users have not linked their AnVIL accounts.
This is in preparation for adding a table of collaborators.
This table will be used on the dbGaP application page to show the list of collaborators, their AnVIL accounts, and whether or not the user is a member of the access group.
This table shows the list of named collaborators, their AnVIL account (if linked), and whether the account is a member of the access group.
We're going to add an audit for dbGaP application collaborators, so rework the current audits to include "access" in the namespace and urls.
Also rename some of the audit classes and views to include "Access" in the name. This will help when we add a collaborator audit, and matches how the audit is done for CDSAs.
Add skeleton classes for the collaborator audits, mostly copy-pasted from the access audits. Add views that currently do nothing, some urls for those views, and test classes with one failing test. These will be fleshed out in future commits.
Write the class definitions for dbGaPCollaboratorAudit and related classes (audit results, tables). Also add some tests; other tests can be added once the views are closer to working.
Also some other temporary changes while working on the view definition.
Also make changes as necessary to other classes/templates. Update the template to pass the correct arguments to resolve. Use the template column in the table now that it's working to handle the resolution and links.
This is simple, and just adds an error for the group. It is useful in the audit resolve view, which needs to call a sub-method to audit a specific application and member.
This lets us have one method that can be called to audit a given application and user/account/group/email record, which will be useful in the audit resolve view.
Also add tests.
Use the admins group specified in the settings file to decide whether or not to ignore groups in the various audits. The audits for both collaborative_nalysis and dbgap collaborators had to be updated.
Then my laptop won't have all its CPU taken up during the tests.
In addition to allowing PIs to see information about a dbGaP application (DAR status, etc), also allow collaborators to see it. Update the view mixin to check if a user is either a PI or a collaborator, and then grant access appropriately.
Also rearrange the nav item order such that similar things are near each other..
Forgot to add it in an earlier branch, so just add it now.
It was resolving the dbGaP url, not the collab analysis url. This is only an issue in the message that's printed out or emailed, so not a big deal to have it wrong before.
Add a statement on the user profile page when there are no associated dbGaP applications for a given user.
ACM staff view users should be able to see the data access mechanisms for a given user. Update the template and tests to ensure this is the case.
Also rearrange the way the information is displayed in order to better separate dbGaP and CDSA information.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow PIs to see information about their dbGaP applications.