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

Remove remaining course acls from video #1061

Closed
dennis531 opened this issue Nov 11, 2024 · 0 comments · Fixed by #1068
Closed

Remove remaining course acls from video #1061

dennis531 opened this issue Nov 11, 2024 · 0 comments · Fixed by #1068
Assignees
Labels
type:bug v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x
Milestone

Comments

@dennis531
Copy link
Collaborator

dennis531 commented Nov 11, 2024

Version
master branch

Describe the bug
The course ACLs of a video will never be removed, as they will be handled like other external OC roles in

public static function filterACLs($acls, $studip_acls)
{
if (!is_array($acls)) {
return [
'studip' => [],
'other' => []
];
}
// prevent duplicate ACLs
$temp_acls = [];
foreach ($acls as $acl) {
$temp_acls[$acl['allow'] .'#'. $acl['role'] . $acl['action']] = $acl;
}
$acls = array_values($temp_acls);
$possible_roles = array_column($studip_acls, 'role');
sort($acls);
$result = [];
foreach ($acls as $entry) {
if (in_array($entry['role'], $possible_roles) !== false) {
$result[$entry['role'] .'_'. $entry['action']] = $entry;
}
}
$result = array_values($result);
sort($result);
$diff = array_udiff($acls, $result, ['Opencast\Models\Helpers', 'compareACLs']);
return [
'studip' => $result,
'other' => $diff
];
}

I had noticed this when fixing #1031.

To Reproduce
Steps to reproduce the behavior:

  1. Remove video from course
  2. Change "Weltweiter Zugriff" to trigger the updateAcl function
  3. Check ACls in Opencast for this video
  4. See ACLs of course are still there
@dennis531 dennis531 self-assigned this Nov 12, 2024
@tgloeggl tgloeggl added the v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x label Nov 25, 2024
@tgloeggl tgloeggl added this to the Opencast 3.18 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug v:3 Everything related to the Stud.IP Opencast Plugin Version 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants