Conversation
|
@kimlisa - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes. |
We want to get away from this pattern of completely hiding parts of Teleport, because it prevents people from learning that these features exist. For now it's fine, but we should start to prefer to always show the tabs and just indicate that the user doesn't have access. |
avatus
left a comment
There was a problem hiding this comment.
Looks and feels really good to use now. I left some UI comments but more of a discussion rather than suggested changes. Feel free to push back/ignore them all.
There was a problem hiding this comment.
I don't think request is good language here but I'm not 100% sold on my suggestion. Best I could come up with.
| + Add to request | |
| + Add Target |
If we use the language from the above comments like "Lock Request" then we can just keep this as is.
There was a problem hiding this comment.
Proceed to Lock? Proceed to Lock Request? Feel free to skip
There was a problem hiding this comment.
| <Text bold>Resources Added ({numAddedResources})</Text> | |
| <Text bold>Targets Added ({numAddedResources})</Text> |
There was a problem hiding this comment.
| Submit Request | |
| Create Locks |
I think it makes sense here to say Create Locks even if used in the button to open this dialog
There was a problem hiding this comment.
| {locks.length} {pluralize(locks.length, 'Resource')} Selected | |
| {locks.length} {pluralize(locks.length, 'Target')} Added |
Again, not 100% sold here as you are selecting resources TO lock so you can skip this one.
There was a problem hiding this comment.
| Listing logins are not supported. Use the input box below to manually | |
| define a login to lock. <br /> | |
| Double check the spelling before adding. | |
| Listing logins is not supported. Use the input box below to manually | |
| define a login to lock. <br /> | |
| Double check the spelling before adding. |
There was a problem hiding this comment.
| <Box>New Request</Box> | |
| <Box>New Lock Request</Box> |
There was a problem hiding this comment.
Shouldn't this just call MakeLock in a loop rather than repeating the same code?
There was a problem hiding this comment.
| Lock access `json:"lock"` | |
| Locks access `json:"lock"` |
Most of these fields are plural.
There was a problem hiding this comment.
Missing license on a lot of these new files.
There was a problem hiding this comment.
| // to define the type of lock to be locked. | |
| // to define the type of resource to be locked. |
There was a problem hiding this comment.
This bit us in the past, right? It's not always a name.
Also, I'm fine with this as-is for simplicity, but note that the data model for the frontend doesn't match the backend now. On the backend, a lock target can have multiple different resources (so long as they are different types).
There was a problem hiding this comment.
This bit us in the past, right? It's not always a name.
i think this only applies to mapping backend with frontend fields, which isn't the case here. this type is only for frontend use. in the api response we get a mapping of targets, it wasn't very useful in its map form so I converted it into a list of LockTarget and added it as an extra field to the frontend model. i did it in this layer so we don't have to always process it when we use it in components.
we have a lot of frontend models that don't match the backend b/c we customize it further to suit our needs. i thought it was okay to do but maybe it shouldn't be done in the service layer. @ryanclark thoughts?
There was a problem hiding this comment.
| return json.map(lock => makeLock(lock)); | |
| return json.map(makeLock); |
is this something recently decided? i'll double check with xin in our upcoming monday meeting, but i thought we wanted it to be possible to turn off features? There are cases where we don't want to hide things, and thought those only applied when the user at least met the minimum criteria eg. most features look for at least a (i'll leave it as is for now though) |
5105601 to
43eade2
Compare
There was a problem hiding this comment.
you can
teleport/lib/auth/auth_with_roles.go
Line 4876 in 860d910
upsert action that requires user to have both the create and update rule
zmb3
left a comment
There was a problem hiding this comment.
I was not able to break it. Thanks so much for this.
Also reverts body `overflow: hidden` Fixes #24885
2981d85 to
adcbf98
Compare
Also reverts body `overflow: hidden` Fixes #24885
part of #25168
enterprise PR: https://github.com/gravitational/teleport.e/pull/1237
recommend reviewing by commit (i plan to delete the old locks code after review)
it was hard to work with one size fit all data structure for the different types of resources especially when there are three types of pagination being used, so decided to re-do and have everything have its own table
design and ux is copied from access requests
in addition
loginslock.listperm and does not render new lock screen if they don't havelock.create and lock.updatepermImprovements for later:
Demo (using a smaller page size to demonstrate paginating):
Screen.Recording.2023-04-27.at.7.04.24.PM.mov