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

refactor: define a single method to remove entities from authz #425

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

leafty
Copy link
Member

@leafty leafty commented Sep 25, 2024

Removing an entity from spicedb is equivalent to removing all relationships where the entity appears as a resource or as a subject. This means we should not need special cases for each entity type.

This refactor should also simplify the code for user removal (remove user entity + remove namespace entity). See #393.

@coveralls
Copy link

coveralls commented Sep 25, 2024

Pull Request Test Coverage Report for Build 11034384359

Details

  • 28 of 33 (84.85%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.03%) to 90.429%

Changes Missing Coverage Covered Lines Changed/Added Lines %
components/renku_data_services/authz/authz.py 28 33 84.85%
Files with Coverage Reduction New Missed Lines %
components/renku_data_services/storage/blueprints.py 1 95.24%
components/renku_data_services/users/db.py 1 94.18%
Totals Coverage Status
Change from base Build 11033349401: 0.03%
Covered Lines: 9335
Relevant Lines: 10323

💛 - Coveralls

@leafty leafty marked this pull request as ready for review September 25, 2024 12:19
@leafty leafty requested a review from a team as a code owner September 25, 2024 12:19
@leafty
Copy link
Member Author

leafty commented Sep 25, 2024

Note: I am not sure if this will work for deleting users, as the permission check would probably fail.

@leafty leafty marked this pull request as draft September 26, 2024 07:24
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.

3 participants