Skip to content
Snippets Groups Projects
Commit bf0c8f1d authored by Dennis Benz's avatar Dennis Benz
Browse files

Handle null episode in check event acl

Users have no permissions on videos added from the work place. This patch fixes this problem by fetching the episode from opencast if the `$episode` parameter is null.
parent daeb1a8a
No related branches found
No related tags found
No related merge requests found
...@@ -886,6 +886,12 @@ class Videos extends UPMap ...@@ -886,6 +886,12 @@ class Videos extends UPMap
*/ */
public static function checkEventACL($eventType, $episode, $video) public static function checkEventACL($eventType, $episode, $video)
{ {
// Fetch episode if null
if (empty($episode)) {
$api_client = ApiEventsClient::getInstance($video->config_id);
$episode = $api_client->getEpisode($video->episode);
}
// Only allow updating of metadata if event has publications // Only allow updating of metadata if event has publications
if (!Helpers::canEventRunWorkflow($episode, $video)) { if (!Helpers::canEventRunWorkflow($episode, $video)) {
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment