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 permissions code #188

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Refactor permissions code #188

merged 2 commits into from
Jun 11, 2024

Conversation

rowanseymour
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.68%. Comparing base (45df7fb) to head (78aa651).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #188      +/-   ##
==========================================
- Coverage   81.75%   81.68%   -0.08%     
==========================================
  Files          33       32       -1     
  Lines        2220     2184      -36     
==========================================
- Hits         1815     1784      -31     
+ Misses        405      400       -5     

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

@rowanseymour rowanseymour marked this pull request as ready for review June 11, 2024 18:02


post_migrate.connect(check_all_permissions)
post_migrate.connect(check_all_group_permissions)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericnewcomer I have a theory that because signal notification order isn't guaranteed, sometimes granting perms happens before creating them

@rowanseymour rowanseymour changed the title Reorganize permissions code Refactor permissions code Jun 11, 2024
from django.utils import timezone

from .perms import sync_permissions

post_migrate.connect(sync_permissions)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will now require smartin.users to be in the installed apps to work.
I guess there might be someone using smartmin without that app

can that be moved to smartmin/__init__.py?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot that smartmin is an app too at the root level... will move

@rowanseymour rowanseymour merged commit 3a0dcab into main Jun 11, 2024
18 checks passed
@rowanseymour rowanseymour deleted the perms branch June 11, 2024 19:29
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