Skip to content

Commit

Permalink
Merge pull request #98 from defstat/pkp/pkp-lib#8093-citation-plugin
Browse files Browse the repository at this point in the history
[citationStyleLanguage][main] #8093 Remove UserGroupDAO reference
  • Loading branch information
asmecher authored Oct 18, 2022
2 parents 5a2e3d3 + dce392c commit 4b747ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pages/CitationStyleLanguageHandler.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,13 @@ public function _setupRequest($args, $request)

protected function canUserAccess($context, $user, $userRoles) {
if ($user && !empty(array_intersect($userRoles, [Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT]))) {
$userGroupDao = DAORegistry::getDAO('UserGroupDAO');
$stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO');
$assignments = $stageAssignmentDao->getBySubmissionAndStageId($this->submission->getId());
foreach ($assignments as $assignment) {
if ($assignment->getUser()->getId() == $user->getId()) {
continue;
}
$userGroup = $userGroupDao->getById($assignment->getUserGroupId($context->getId()));
$userGroup = Repo::userGroup()->get($assignment->getUserGroupId($context->getId()));
if (in_array($userGroup->getRoleId(), [Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT])) {
return true;
}
Expand Down

0 comments on commit 4b747ea

Please sign in to comment.