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

Collaborative analysis workspaces #400

Merged
merged 37 commits into from
Feb 16, 2024
Merged

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Jan 25, 2024

Add a new Collaborative Analysis Workspace type.

  • Add the new WorkspaceData type

  • Add auditing for access to Collaborative Analysis Workspaces. To have access to the analysis workspace, you must be listed as an analyst and also have access to all of the source workspaces (e.g., be in all auth domains for the source workspaces)

  • Add note about DCC access on audit page

Closes #345

This app will deal with collaborative analysis workspaces.
This adapter has no customization other than the workspace data
form yet.
The analyst_group is a group on AnVIL that contains the set of
people who are specified by the analyst as writers. Update the
workspace data form, the template, and tests to account for this
group. Only show the group in the template to users with StaffView
permission.
These dataclasses are intended to hold the result for a given account
and workspace when the audit is run.
Finish writing the unit tests for the _audit_workspace_and_account
method. Modify the method as necessary to pass the tests.
In addition to checking analyst auth domain membership, also check
that there are no groups in the auth domain. Make an exception for
PRIMED_CC_ADMINS, which we expect to be in all of the groups in the
app. TBD how to handle PRIMED member/writer groups. To facilitate
this update, change the AccessAuditResult.account attribute name to
AccessAuditResult.member and the type to be either an Account or
ManagedGroup.
When using a factory to create various types of workspaces (e.g.,
dbGaPWorkspaceFactory, CDSAWorkspaceFactory, ...), set the name of
any related object using the name of the workspace. Examples: the
auth domain for that workspace, an associated writers group, etc.
This mimics how we create them for real.
This view shows the results of an access audit for collaborative
analysis workspaces. Add classes to the audit source file that
enable showing this website (e.g., tables, etc.). Add a url and a
template. Note that we haven't figured out how to handle the DCC
writers group yet, so there is a test that fails with a note about
that.
For staff view users, show a link to the audit page for a collaborative
analysis workspace on its detail page. Add tests to check that
only staff viewers see it.
Ignore PRIMED CC group sin the auth domain for a collaborative
workspace audit. These groups will be expected to potentially be
there and it is not an error.
Instead of ignoring PRIMED_CC_MEMBERS and PRIMED_CC_WRITERS in the
collaborative analysis workspace audit, include them in the checks.
These groups both should have access to the workspace, so either
return a Verified or GrantAccess result.
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (ed52adf) 98.27% compared to head (eb73ada) 98.46%.
Report is 240 commits behind head on main.

Files Patch % Lines
primed/collaborative_analysis/tests/factories.py 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #400      +/-   ##
==========================================
+ Coverage   98.27%   98.46%   +0.18%     
==========================================
  Files         232      262      +30     
  Lines       17829    20002    +2173     
==========================================
+ Hits        17522    19694    +2172     
- Misses        307      308       +1     

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

In the audit results, show a checkbox to indicate if an account
has current access to the workspace or not.
PRIMED_CC_WRITERS should get access, but not PRIMED_CC_MEMBERS.
@amstilp amstilp marked this pull request as ready for review February 16, 2024 22:12
@amstilp amstilp merged commit 7d81e7f into main Feb 16, 2024
8 checks passed
@amstilp amstilp deleted the feature/collab-analysis-workspaces branch February 16, 2024 22:33
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.

Add collaborative analysis workspaces
1 participant