-
Notifications
You must be signed in to change notification settings - Fork 0
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
WP-409: Set members to superuser via TAS #931
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #931 +/- ##
==========================================
- Coverage 64.76% 64.72% -0.04%
==========================================
Files 431 431
Lines 12439 12457 +18
Branches 2598 2604 +6
==========================================
+ Hits 8056 8063 +7
- Misses 4157 4165 +8
- Partials 226 229 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Tested locally, LGTM. Just optional comments for readability.
563a40c
to
5c85ab7
Compare
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.
Looks great! Just added one more suggestion wrt logging
Should be good now. Thanks!! ✅ |
Tested with both groups and users. Log-in sets the user, below is a log of the testing via model commits: -- with user included in list --- In [2]: my_user = get_user_model().objects.get(username='cyemparala') In [3]: my_user.is_staff = False In [4]: my_user.is_superuser = False In [5]: my_user.save() In [6]: my_user = get_user_model().objects.get(username='cyemparala') In [7]: print(my_user.is_staff) In [8]: print(my_user.is_superuser) -- with group -- In [13]: my_user.is_staff = False In [14]: my_user.is_superuser = False In [15]: my_user.save() In [16]: my_user = get_user_model().objects.get(username='cyemparala') In [17]: print(my_user.is_superuser) In [18]: my_user = get_user_model().objects.get(username='cyemparala') In [19]: print(my_user.is_superuser) In [20]: |
Overview
Staff and Superuser can be set in through the
_PORTAL_ELEVATED_ROLES
object insettings_default.py
orsettings_custom.py
for per-portal configuration. Either the TAS group or TACC id can be used.Related
Changes
_PORTAL_ELEVATED_ROLES
object insettings_default.py
and imported it tosettings.py
settings.py
Testing
_PORTAL_ELEVATED_ROLES
dictapi/users/auth/
endpoint and verify the responseTACC-ACI
or other TAS groups you may be on.UI
No visible UI change except for the Onboarding Admin view for superusers
Notes