Skip to content

Commit

Permalink
explicitly checking for simple pages in ACL
Browse files Browse the repository at this point in the history
This was causing a problem when upgrading Omeka, since the ACL role didn't exist while the plugin needed an upgrade, but it was still passing the 'is active' check
  • Loading branch information
jaguillette committed Mar 16, 2018
1 parent 8fa8de2 commit 903aea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CourseToolsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function hookDefineAcl($args)
$acl->allow('student', 'Elements', 'element-form');

# Set student permissions on Simple Pages
if (plugin_is_active("SimplePages")) {
if ($acl->has('SimplePages_Index') && $acl->has('SimplePages_Page')) {
if (get_option('simple-page-access')) {
$acl->allow('student', array('SimplePages_Index', 'SimplePages_Page'));
}
Expand Down

0 comments on commit 903aea3

Please sign in to comment.