Skip to content

Commit

Permalink
feat(shs-6048): simplify preparer access logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nJim committed Mar 3, 2025
1 parent c1b805c commit dbc58e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docroot/modules/humsci/hs_editorial/hs_editorial.module
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ function hs_editorial_node_access(NodeInterface $node, $op, AccountInterface $ac
// not differentiate between published and unpublished nodes.
if ($op === 'update'
&& $node->isPublished()
&& in_array('preparer', $account->getRoles())
&& !$account->hasPermission('edit any ' . $node->bundle() . ' content')) {
&& in_array('preparer', $account->getRoles())) {
return AccessResult::forbidden()->addCacheableDependency($node);
}
// Default response should return neutral, letting other access checks decide.
Expand Down

0 comments on commit dbc58e3

Please sign in to comment.