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 ability to ignore WorkspaceSharing audit results #559

Merged
merged 19 commits into from
Jan 10, 2025

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Jan 9, 2025

  • Add a model and supporting views to track IgnoredWorkspaceSharing audit results
  • Check IgnoredWorkspaceSharing when running WorkspaceSharingAudits

amstilp added 15 commits January 8, 2025 16:19
Add an abtract model that stores standard information for ignored
audit results (e.g., who ignored it and a note). Use this abstract
model to define the existing IgnoredManagedGroupMembership model
and the new IgnoredWorkspaceGroupSharing model.
Add more namespaces, eg the by_workspace namespace.
Also add the get_absolute_url method for the model class.
Include the FilterView directly instead of adding it in a later
commit; so also add a table and a filter class definition.
These subclasses track more infomration about a given "Not In App"
audit result.
Update both the main audit class as well as the view. Add a link to
the create view for an IgnoredWorkspaceSharing record in the not_in_app
table.
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.77%. Comparing base (7eb9fbf) to head (20402e3).
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #559      +/-   ##
==========================================
+ Coverage   99.76%   99.77%   +0.01%     
==========================================
  Files         166      172       +6     
  Lines       26181    27630    +1449     
==========================================
+ Hits        26120    27569    +1449     
  Misses         61       61              

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

Some of the tests assumed a specific ordering for IgnoredWorkspaceSharing
records, plus there was a separate test to sepcific check ordering.
Update the other tests to not rely on a specific ordering, such that
the ordering is only tested in the specific test for it.
This mirrors how we defined a class for IgnoredWorkspaceSharing
results; this way, we can store the current role that the email has
in the group, and report it.
Some of the tests added a get_absolute_url method to the user. Delete
the attribute so that other tests work as exepcted.
@amstilp amstilp merged commit e6e7b8b into main Jan 10, 2025
13 checks passed
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