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

Add view to audit all dbGaP Applications and Workspaces at the same time #418

Merged
merged 12 commits into from
Feb 6, 2024

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Feb 2, 2024

Add a view to do a "full" audit of dbGaP access, which audits access to all dbGaPWorkspaces for all dbGaPApplications.

  • Refactor dbGaP auditing classes to use only one class without duplicated code.
  • Add a new view to audit all application/workspace combos.

Instead of having an abstract base class and subclassing that to audit
a dbGaPApplication or a dbGaPWorkspace, instead just use the super
class itself. Update dbGaPAccessAudit to be a non-abstract class and
to take a queryset of dbGaPApplications and dbGaPWorkspaces to audit.
Remove the dbGaPApplicationAccessAudit and dbGaPWorkspaceAccessAudit
classes. Note that views and the rest of the app is still broken.
In the view that audits access to a single dbGaPWorkspace, use the
revamped dbGaPAccessAudit class instead of the dbGaPWorkspaceAccessAudit
class that no longer exists. Update a couple tests where necessary.
Raise an error if the input is not a queryset of the correct model.
When creating a dbGaPApplication using a factory, give the AnVIL
access group the name that it would be given if you created it via
the create view.
When creating the dbGaP workspace auth domain using dbGaPWrkspace
factory, give the auth domain group a name that is related to the
workspace name.
As part of this, update the dbGaP DAR factory to match the workpace
consent abbreviation as well as code.
Add a view that audits access to all dbGaP workspaces for all
applications.
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e57f6f5) 98.32% compared to head (e0b4157) 98.32%.
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #418   +/-   ##
=======================================
  Coverage   98.32%   98.32%           
=======================================
  Files         240      241    +1     
  Lines       18235    18317   +82     
=======================================
+ Hits        17929    18011   +82     
  Misses        306      306           

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

Add a field to the data classes for audit results, and set it
automatically as a class attribute for different subclasses. Show
the has_access field in the audit results table.
@amstilp amstilp marked this pull request as ready for review February 6, 2024 22:12
@amstilp amstilp merged commit 9641dd2 into main Feb 6, 2024
8 checks passed
@amstilp amstilp deleted the feature/audit-all-dbgap-applications branch February 6, 2024 22:14
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