ytsaurus-ui icon indicating copy to clipboard operation
ytsaurus-ui copied to clipboard

Management of groups through UI

Open zlobober opened this issue 8 months ago • 0 comments

This issue is similar to #633, but for the groups.

There is a "/groups" page displaying all groups.

  1. Let's add a yellow button for creating a group at the top right corner

image

Modal should ask only for the group name. To create a group, the create("group", attributes={"name": "<name>"}) should be issued.

  1. Let's add an "@" icon opening the attributes of a group, similar to how it is done on the Users page:

image image image

  1. Let's add a pen icon opening the modal window for editing the group, similar to the users interface

image

image

3.1) There should be a "General" tab, on which there should be the only field "group name". In order to change the group name, a Cypress request set("//sys/groups//@name", "") should be issued.

3.2) On another tab "members" I suggest to have a standard two column interface for adding/removing members from a group.

 Group members      |     All users and groups
 [search]           |         [search]
 alice              |         charlie
 bob                <-        john
 joe                ->        admins    
 devs               |         analytics
                    |                   ...


[Save]

(ChatGPT suggests that this thing is called a "dual list box")

Left column should consist of //sys/groups/<group>/@members. Right column should consist of "everybody else", which is the union of list("//sys/users") and list("//sys/groups") minus the members of the group. Both lists should be in the alphabet order.

A "search" should perform in-memory filtration by a substring.

Press of "save" should issue a batch of add_member("<member>", "<current group>") or remove_member("<member>, "<current group>") which remove the and add the members that were included or excluded from the original list.

Finally, let's make a button "save" inactive if the current user has no right to edit a seleted group. In order to check this permission, make a request check_permission("", "write", "//sys/groups/"). If the result is "deny", let's also add a red text near the "save" button that says

No permission to edit members of the group <selected group>. In order to edit members for a user, the "write" permission on the group is required, or you must be a superuser.

zlobober avatar Jun 20 '24 16:06 zlobober