- Notifications
You must be signed in to change notification settings - Fork928
feat: add organization-scoped permission checks to deployment settings#14063
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
alwaysmeticulousbot commentedJul 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🤖 Meticulous spotted visual differences in 321 of 735 screens tested:view and approve differences detected. Last updated for commit5a547fc. This comment will update as new commits are pushed. |
ad74fcf
tof6dfce0
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
site/src/pages/ManagementSettingsPage/OrganizationSettingsPage.tsx OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
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 left a few comments, and I see there are a few TODOs in the codebase. Do you plan to finish these TODOs during the current work or address them later? If later, would it make sense to transform the important ones into issues?
PS: I'm going to QA this at some point today.
I QAed the changes and they look good, but I think it could be better if you have specific areas where I should look for issues. Since it is a "draft" PR I'm not approving it for now, but feel free to request another review at any time. |
code-asher commentedJul 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@BrunoQuaresma Thank you for giving it an early look! I still need to add/update some tests/Storybooks and then I think it will be good to go. I will make some notes on the kinds of things that need to be QA'd. As for the TODOs, I will check with Kira and make issues for the ones she thinks makes sense. |
8a411e3
tob8bffa5
CompareAll right, I updated the tests and added stories but I had to break out into some views to do that. The code is mostly unchanged but the diff will look a a bit large. So generally here is what I have been testing:
NOTE: The audit log will not work right now for org admins/auditors, but they will once Steven's PR is merged so I will leave this in a draft until that is done then I will mark ready and request a review. <3 |
b8bffa5
to19f3895
Compare19f3895
to584bd19
CompareSeems like all the other frontend variables use the `view` syntax.Arguably we should use `read` to match the backend, but `view` does seemmore UI-like.
All the checks now require both the experiment and license.I also renamed the variable canViewOrganizations everywhere forconsistency.
You will only see the button if you can create a group in that org.Now that the old site-wide group permission is unused, remove it.
Since in addition to deployment settings this page now also includesusers, audit logs, groups, and orgs.Since you might not be able to fetch deployment values, move all theloaders to the individual pages instead of in the wrapping layout.
We only use this layout when multi-org is enabled, so no need to run thecheck a second time.
An auditor for example appears to have the view deployment valuespermission but cannot view licenses.
584bd19
to185f2c0
CompareShould be good to go now! |
ccb05b8
to72bf345
Compare72bf345
tod7afcfc
CompareBrunoQuaresma commentedAug 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
code-asher commentedAug 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thank you for the thorough testing!!
This should be fixed! Looks like you were on an older commit.
|
code-asher commentedAug 5, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I changed the automatic redirect for auditors, so now it just says "you have no permissions to edit" if there are no permissions instead of trying to redirect to the audit log. I think we will probably want to consider a better design for this though. I updated the ticket to reflect needing a decision on this. |
1d9ad8a
to01c4b19
CompareThe 0000 syntax does not work, it has to be the actual org ID.Technically this is probably not necessary since it means only adminscan create groups which was already the case, but I think being explicitabout the org we are checking is a good idea, even if these pages willeventually go away in favor of the multi-org ones.
I think this needs a proper design/decision.
01c4b19
toe58b032
CompareOriginally I thought I should update these to use the org-basedpermissions query but I think maybe I should scope my changes to justthe multi-org settings page and leave the old pages alone for now.
I think the "you do not have permission to edit" message might make itsound like you can do nothing at all with the org, but it might be thatyou can edit members and groups, just not the org settings.So, instead, show the org settings but disable the form if you cannotedit. Probably there is still a better design but maybe this is OK fornow.
code-asher commentedAug 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Just FYI I reverted two changes to the old groups and users pages, I felt like they were out of scope for this PR and I did not directly call them out in the list of stuff to test. I also changed the org settings page to show an ineditable form instead of a big "you cannot edit this org" message but I will get a proper design for this page when a user has no permissions later. |
097f739
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Part of#13915
You should be able to see the all the links on the settings page to which you have access, and those pages should react appropriately (like groups should only have the create group button if you have permission, etc).
This only affects multi-org. There should be no change if not multi-org.