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.)
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.)