fix(auth): allow assigning SSO default role to current user's role or below#99595
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #99595 +/- ##
==========================================
+ Coverage 79.70% 81.24% +1.54%
==========================================
Files 8589 8592 +3
Lines 380508 380645 +137
Branches 24122 24122
==========================================
+ Hits 303270 309257 +5987
+ Misses 76876 71026 -5850
Partials 362 362 |
| assert resp.status_code == 200 | ||
|
|
||
| # no update occurred. owner is not an option from the dropdown |
There was a problem hiding this comment.
Are you checking the dropdown to make sure that owner is not in the dropdown? It looks like the update to the post on line 506 just doesn't update?
5fbcf67 to
b68ae98
Compare
There was a problem hiding this comment.
Bug: SSO Form Role Inconsistency
On the SSO settings form, a non-superuser's default_role field uses organization.default_role as its initial value. If this role is not manageable by the current user, it won't be in the filtered role_choices, leading to an inconsistent form state where the initial selection is unavailable.
src/sentry/web/frontend/organization_auth_settings.py#L81-L92
sentry/src/sentry/web/frontend/organization_auth_settings.py
Lines 81 to 92 in b68ae98
Fixes VULN-79 and RTC-1127