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

Expose new UserGroup attribute in admin-area POST/PATCH/GET endpoints #569

Closed
tcompa opened this issue Sep 26, 2024 · 2 comments · Fixed by #571
Closed

Expose new UserGroup attribute in admin-area POST/PATCH/GET endpoints #569

tcompa opened this issue Sep 26, 2024 · 2 comments · Fixed by #571

Comments

@tcompa
Copy link
Collaborator

tcompa commented Sep 26, 2024

Requires:

The fractal-server changes are

  • The UserGroup model and schemas will have a new viewer_paths string-array non-nullable attribute.
  • This new attribute can be optionally included in POST /auth/groups/ request body
  • This new attribute can be optionally included in PATCH /auth/groups/{group_id}/ request body
  • This new attribute will always be part of response bodies for GET /auth/groups/, GET /auth/groups/{group_id}/, PATCH /auth/group/{user_id}/

The necessary fractal-web changes reflect the ones above:

  • Display the number of viewer_paths for each group in the all-groups page (.../v2/admin/groups)
  • Display this new attribute in the single-group page (.../v2/admin/groups/{group_id})
  • Include this new attribute in the edit-page (.../v2/admin/groups/{group_id}/edit)
@tcompa
Copy link
Collaborator Author

tcompa commented Sep 27, 2024

Available as of fractal-server 2.6.3.

We also included an endpoint for a standard users to learn about their viewer_paths (GET /auth/current-user/viewer-paths/, returning a list of paths), and this information could be perhaps be displayed somewhere in the current-user's pages

I'd start simple, by just listing the relevant user pages:

  1. profile (always)
  2. settings (if FRACTAL_RUNNER_BACKEND is slurm or slurm_ssh)
  3. viewer paths (if PUBLIC_FRACTAL_VIZARR_VIEWER_URL is set)

@zonia3000 zonia3000 mentioned this issue Sep 27, 2024
1 task
@zonia3000
Copy link
Collaborator

image

image

image

image

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