Skip to content
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

Support new user groups / admin-side #550

Closed
tcompa opened this issue Sep 10, 2024 · 3 comments · Fixed by #551
Closed

Support new user groups / admin-side #550

tcompa opened this issue Sep 10, 2024 · 3 comments · Fixed by #551

Comments

@tcompa
Copy link
Collaborator

tcompa commented Sep 10, 2024

As of fractal-server 2.4.0, superuser will have access to these new routes

  • GET /auth/group/ get list of groups, with query param user_ids=False
  • POST /auth/group/ creates an empty group
  • GET /auth/group/{group_id}/
  • PATCH /auth/group/{group_id}/ - associates existing users to an existing group
  • DELETE /auth/group/{group_id}/ (not supported, for the moment)
  • GET /auth/group-names/: an auxiliary endpoint which is also available to standard users
  1. New admin-area user-groups page
  2. Updates to admin-area user page (e.g. show groups of user, in their own info page, and expose possibility of adding user to other groups)
@tcompa tcompa changed the title [Support new user groups / admin-side Support new user groups / admin-side Sep 10, 2024
@tcompa
Copy link
Collaborator Author

tcompa commented Sep 10, 2024

In fractal-server 2.4.0a0, the PATCH /auth/group/{id}/ endpoint lets us associate one group to N users (request-body attribute new_user_ids)


As of fractal-server 2.4.0.a1, the PATCH /auth/users/{id}/ lets us associate one user to N groups (request-body attribute new_group_ids)

WARNING: The new PATCH endpoint cannot be used to simultaneously modify the user's attributes (e.g. their slurm_user) and associate the user to new groups. This, for the moment, must go through two independent PATCH calls.

@zonia3000
Copy link
Collaborator

@tcompa I opened #551 as draft (no tests yet).

Can you have a look and tell me if it is everything as expected from usability perspective?

This is the admin groups page:

image

Does it make sense to keep also the All group in this table?

Group info page:

image

Group editing page implemented with drag and drop:

image

Possibility to add groups to the user from user editing page:

image

Notice that the group is added when clicking the "Add" button in the modal, not when clicking on the "Save" button of the page. Is this misleading?

@tcompa
Copy link
Collaborator Author

tcompa commented Sep 11, 2024

Great. I tried all new pages, and it works as expected.

Does it make sense to keep also the All group in this table?

I'd say yes. It's good to be sure that it exists, and we should be able to detect if a user does not belong to it (due to some error)

Notice that the group is added when clicking the "Add" button in the modal, not when clicking on the "Save" button of the page. Is this misleading?

As discussed right now, we can improve it by grouping the two API calls.

Group editing page implemented with drag and drop:

Great :)
Let's make the info/edit pages a bit more homogeneous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants