Skip to content

Commit

Permalink
pkp/pkp-lib#5504 Add 'permit settings' flag on user groups
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Sep 13, 2024
1 parent 8badcd3 commit f68e93a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use APP\core\Application;
use PKP\controllers\grid\plugins\PluginGridHandler;
use PKP\controllers\grid\plugins\PluginGridRow;
use PKP\security\authorization\CanAccessSettingsPolicy;
use PKP\security\authorization\ContextAccessPolicy;
use PKP\security\authorization\PluginAccessPolicy;
use PKP\security\Role;
Expand Down Expand Up @@ -101,6 +102,7 @@ public function authorize($request, &$args, $roleAssignments)
} else {
$this->addPolicy(new ContextAccessPolicy($request, $roleAssignments));
}
$this->addPolicy(new CanAccessSettingsPolicy());
return parent::authorize($request, $args, $roleAssignments);
}
}
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
<migration class="APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9462_UserUserGroupsStartEndDate"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9552_UserGroupsMasthead"/>
<migration class="PKP\migration\upgrade\v3_5_0\I5504_UserGroupsSettings"/>
<migration class="APP\migration\upgrade\v3_5_0\I9425_SeparateUIAndSubmissionLocales"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9709_UserUserGroupsMasthead"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9566_UserRememberToken"/>
Expand Down
4 changes: 2 additions & 2 deletions registry/userGroups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<groups>
<!-- Managerial Role -->
<group roleId="0x00000010" name="default.groups.name.manager" plural="default.groups.plural.manager" abbrev="default.groups.abbrev.manager" permitMetadataEdit="true" />
<group roleId="0x00000010" stages="1,3,4,5" name="default.groups.name.editor" plural="default.groups.plural.editor" abbrev="default.groups.abbrev.editor" permitMetadataEdit="true" masthead="true" />
<group roleId="0x00000010" name="default.groups.name.manager" plural="default.groups.plural.manager" abbrev="default.groups.abbrev.manager" permitMetadataEdit="true" permitSettings="true" />
<group roleId="0x00000010" stages="1,3,4,5" name="default.groups.name.editor" plural="default.groups.plural.editor" abbrev="default.groups.abbrev.editor" permitMetadataEdit="true" masthead="true" permitSettings="true" />
<group roleId="0x00000010" stages="4,5" name="default.groups.name.productionEditor" plural="default.groups.plural.productionEditor" abbrev="default.groups.abbrev.productionEditor" permitMetadataEdit="true" />

<!-- Section Editor Role -->
Expand Down

0 comments on commit f68e93a

Please sign in to comment.