opencast / annotation-tool

A video annotation service that is suitable for research, teaching and learning
Educational Community License v2.0
38 stars 18 forks source link

Always let the Backend decide who is Annotate-Admin #591

Closed KatrinIhler closed 1 year ago

KatrinIhler commented 1 year ago

The backend uses the authorization service of Opencast to check the rights a user has for a specific media package. This way, the configured ACL merge mode is taken into consideration. The frontend would only consider the event ACL if it existed, and disregard the series ACL entirely. This meant that if a user had access rights granted by a series, they would be able to use the annotation tool (because this check was always performed by the backend), but would not see the UI elements for annotate admins, even if the series granted him those rights. This PR fixes that by introducing a new endpoint so the frontend can ask the backend whether the logged-in user is an annotate-admin. (Also I did some refactoring which ended up not having much to do with the actual changes, but they're still nice to have.)