Skip to content

Display only directly assigned roles in user modal #1251

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

Merged
merged 4 commits into from
May 16, 2025

Conversation

snoesberger
Copy link
Contributor

fix #1239

This fix ensures that only directly assigned roles are displayed in the roles tab of the user modal.

@snoesberger snoesberger added the type:usability Improves the UX label May 13, 2025
Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1251

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1251

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

Copy link
Contributor

github-actions bot commented May 13, 2025

This pull request is deployed at test.admin-interface.opencast.org/1251/2025-05-16_06-42-38/ .
It might take a few minutes for it to become available.

@Arnei Arnei self-requested a review May 14, 2025 08:38
Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, but I would like to see the filtering happen outside the SelectContainer component. Imo it is the task of the calling components to provide the correct data.

Did you test this with users with many roles (upwards of a thousand)? Is it performant?

@snoesberger snoesberger force-pushed the 1239-fix-user-roles-effectiveRoles branch from adbe9a9 to ef618cc Compare May 14, 2025 13:32
Not only assigned but also derived roles were display in the "Roles" tab
of the user modal.
@snoesberger snoesberger force-pushed the 1239-fix-user-roles-effectiveRoles branch from ef618cc to 8c2c112 Compare May 14, 2025 13:35
@snoesberger
Copy link
Contributor Author

Thanks for the review @Arnei. I did address your suggestions and did move the filtering to the UserDetails component. Code is ready for an other review.

@snoesberger snoesberger requested a review from Arnei May 14, 2025 13:55
Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I click on "Add user" and click on the "Roles" tab in the "Create new user" modal, the ui breaks (white screen).

As with the user details view, we also need to provide the assignedRoles
attribute in the New User dialogue.
@snoesberger
Copy link
Contributor Author

If I click on "Add user" and click on the "Roles" tab in the "Create new user" modal, the ui breaks (white screen).

Since the new user dialog also uses the SelectContainer, I had to add the assignedRoles attribute to the NewUserWizard as well. Now, creating a new user and assigning roles simultaneously is working again.

@snoesberger snoesberger requested a review from Arnei May 15, 2025 09:09
@Arnei
Copy link
Member

Arnei commented May 15, 2025

Everything else is looking fine now.

Reduce the attributes of handleSubmit when updating or creating a user.
@snoesberger snoesberger requested a review from Arnei May 16, 2025 06:44
@Arnei Arnei merged commit 6c75239 into opencast:main May 16, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:usability Improves the UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In the user modal, the "Roles" and "Effective Roles" tabs display the same information.
2 participants