-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
eeded33
to
71eca1b
Compare
|
||
|
||
post_migrate.connect(check_all_permissions) | ||
post_migrate.connect(check_all_group_permissions) |
There was a problem hiding this comment.
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
smartmin/users/models.py
Outdated
from django.utils import timezone | ||
|
||
from .perms import sync_permissions | ||
|
||
post_migrate.connect(sync_permissions) |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
No description provided.