Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Management of groups through UI #634

Open
zlobober opened this issue Jun 20, 2024 · 0 comments
Open

Management of groups through UI #634

zlobober opened this issue Jun 20, 2024 · 0 comments
Assignees
Labels

Comments

@zlobober
Copy link

zlobober commented Jun 20, 2024

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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants