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

Seperate user and non-user roles #1006

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Dec 11, 2024

Fixes #905.

Changes the access policy tab of various details modals. User roles get displayed in a seperate table from the other roles, with user name and email. This should make it more intuitive to "give someone access to a video/ series". Functionality should not change, the resulting ACLs will look the same as before.

Caveat 1: If roles are sanitized, we cannot reliably derive the user from their user role. Therefore, this feature will be disabled if user role sanitization is enabled in Opencast. (The old admin ui allowed for sanitized roles and did some best effort guesswork to derive users from roles. Even though that approach worked for many, I'd rather not reintroduce such brittle code here.)

Caveat 2: I did not find a performant way to query for user information for each and every user. Therefore, if there are upwards of multiple thousands of users, the access policy tab will take several seconds to load.

Requires backend changes. Will break the UI otherwise. opencast/opencast#6382

How to test this patch

As this requires backend changes, the automatically generated stuff from github-actions below will not work.

Install the backend PR in your Opencast. Run this PR against your Opencast, like so PROXY_TARGET=http://localhost:8080 npm start. The sanitize flag can be found in your Opencast configuration files in etc/org.opencastproject.userdirectory.UserIdRoleProvider.cfg.

Screenshots:
Bildschirmfoto vom 2024-12-11 14-51-03

Bildschirmfoto vom 2024-12-11 14-52-56

Changes the access policy tab of various
details modals. User roles get displayed in a
seperate table from the other roles, with user
name and email. This should make it more
intuitive to "give someone access to a video/
series". Functionality should not change,
the resulting ACLs will look the same as before.

Caveat 1:  If roles are sanitized, we cannot
reliably derive the user from their user
role. Therefore, this feature will be disabled if
user role sanitization is enabled in Opencast.

Caveat 2: I did not find a performant  way to
query for user information for each and every
user.
Therefore, if there are upwards of multiple
thousands of users, the access policy tab will
take several seconds to load.
@Arnei Arnei added the type:enhancement New feature or request label Dec 11, 2024
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-1006

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-1006

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 Dec 11, 2024

This pull request is deployed at test.admin-interface.opencast.org/1006/2024-12-12_16-23-24/ .
It might take a few minutes for it to become available.

Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seperate user and non-user roles in the access policy modal
1 participant