-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: UI graceful handling of restricted permissions for instance related actions [WD-18840] #1094
feat: UI graceful handling of restricted permissions for instance related actions [WD-18840] #1094
Conversation
80b5ad3
to
ed8751b
Compare
f7eec10
to
ca4a739
Compare
3508ad9
to
07ea391
Compare
3f86d31
to
f4c68ba
Compare
0a8b453
to
67b9b71
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.
Reviewed this partially. Some comments below.
I hope after merging the image permission PR this becomes smaller and easier to handle.
831836e
to
eba7f20
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.
Read through half of the files, some observations below.
c43c795
to
d220376
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.
Thanks for the improvements!
Main question now is if we can even have the situation of viewing/creating/editing an instance and not being able to see the other resources like profiles or images. If the answer is no, some of the current changes are not needed, because the conditions will never apply.
src/pages/instances/actions/snapshots/InstanceEditSnapshotBtn.tsx
Outdated
Show resolved
Hide resolved
We can certainly view/create/edit without permissions to see profiles/images/networks etc. It would be specific things that we can't modify on the instance. For instance creation, without profile permissions means the user would have to create an instance from scratch with no defaults. You can also create an instance without network btw. |
d220376
to
9ba00fc
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.
Thanks for the improvements, some more observations below. Still didn't get to read through all the code yet.
src/pages/instances/actions/snapshots/InstanceSnapshotActions.tsx
Outdated
Show resolved
Hide resolved
src/pages/instances/actions/snapshots/CreateInstanceFromSnapshotBtn.tsx
Outdated
Show resolved
Hide resolved
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.
Thanks, this is pretty close, some more comments below. Read through most of the files now.
src/pages/instances/actions/snapshots/InstanceSnapshotActions.tsx
Outdated
Show resolved
Hide resolved
src/pages/instances/actions/snapshots/CreateInstanceFromSnapshotBtn.tsx
Outdated
Show resolved
Hide resolved
464e279
to
6f402ce
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.
Finished reviewing all the files just now. Some comments below.
6f402ce
to
7b7cde1
Compare
@edlerd as discussed, the bulk action buttons are now disabled if the user does not have permission manage state for all selected instances on the list page. |
7086eac
to
e090470
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.
Thanks for fixing the bulk case. Looks all right now. Found small things in the instance edit form and some suggestions to simplify.
e090470
to
8b3ba32
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.
Code LGTM, good stuff :)
Still need to do QA, but can also merge as is and improve potential QA as a next iteration to unblock other PRs.
There are quite a few PRs depending on this one, so I think it'd be good to merge this one now and have follow ups for QA issues. |
…rmissions Signed-off-by: Mason Hu <[email protected]>
8b3ba32
to
ff8e933
Compare
Done
Everything marked as "done" in the "Instances" tab of this spreadsheet
Review changes to be applied (based on discussions from other PR)
QA
can_view_projects
onserver
;can_view_events
onproject
;can_view_operations
onproject
)