Skip to content

Commit

Permalink
add permission for exhibit files cover image
Browse files Browse the repository at this point in the history
There's apparently a separate permission for exhibit builder files, so I've added that permission when exhibit builder is present, so that students can modify exhibit cover images.
  • Loading branch information
jaguillette committed Nov 12, 2021
1 parent 903aea3 commit d0a2ab5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CourseToolsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ public function hookDefineAcl($args)

# Allow students to edit own files, autocomplete tags, access additional elements.
# These permissions don't fit into the defined permissions, but are needed.
$acl->allow('student','Files','editSelf');
$acl->allow('student','Tags',array('autocomplete'));
$acl->allow('student', 'Files', 'editSelf');
$acl->allow('student', 'Tags', array('autocomplete'));
$acl->allow('student', 'Elements', 'element-form');
# Allow students access to cover images if Exhibit Builder is installed
if ($acl->has('ExhibitBuilder_Files')) {
$acl->allow('student', 'ExhibitBuilder_Files', 'cover-image');
}

# Set student permissions on Simple Pages
if ($acl->has('SimplePages_Index') && $acl->has('SimplePages_Page')) {
Expand Down

0 comments on commit d0a2ab5

Please sign in to comment.