ytsaurus-ui
ytsaurus-ui copied to clipboard
Management of users through UI
This one is similar to #634, but for users.
There is a page with users (/users). It allows some of the actions with users, but lacks various useful administration primitives.
- Deleting a user - I'd suggest adding it as a trash bin icon in the row corresponding to a user to the right. A modal window "Are you sure you want to delete..." should appear.
- Renaming a user: I'd suggest adding a text box "Name" here, and if the name is changed, a Cypress request
set("//sys/users/<username>/@name", "<new name>")
should be issued
- Creating a new user
I'd suggest adding a new button "create new" which opens a modal window with the only text field "name"; to create a user, a Cypress request create("user", attributes={"name": "<name>"})
should be issued. NB: this is a special form of a Cypress create
request that lacks target path, and it is perfectly fine.
- Set user password
Let's add a new vertical tab here called "Change password"
First, you should check a check-permission request in order to see if logged user has a permission to change the selected user's password. This may be done via request check_permission("<logged user>", "administer", "//sys/users/<selected user>")
.
a) If the result is deny, let's just write a following red text:
No permission to change user <selected user> password. In order to change the password for a user, the "administer" permission on the user is required, or you must be a superuser.
b) If the result is allow, let's have a text box with masked characters:
New password: <********>
On save the request set_user_password("<selected user>", "<new_password_sha256>")
should be issued.