Skip to content

Commit a60efc9

Browse files
committed
Merge branch 'develop' into release/6.63.1
2 parents 69fc63e + 838e2d1 commit a60efc9

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

config/packages/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ security:
5353
access_control:
5454
# - { path: ^/admin, roles: ROLE_ADMIN }
5555
# - { path: ^/profile, roles: ROLE_USER }
56-
- { path: ^/log-viewer, roles: ROLE_DATA_REPOSITORY_MANAGER }
56+
- { path: ^/log-viewer, roles: [ROLE_DATA_REPOSITORY_MANAGER, ROLE_DEVELOPER] }
5757

5858
when@test:
5959
security:

src/Entity/Account.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ class Account extends Entity implements UserInterface, EquatableInterface
4444
*/
4545
const ROLE_SUBJECT_MATTER_EXPERT = 'ROLE_SUBJECT_MATTER_EXPERT';
4646

47+
/**
48+
* A role given only to Developers.
49+
*/
50+
public const ROLE_DEVELOPER = 'ROLE_DEVELOPER';
51+
4752
/**
4853
* This is defined here to override the base class id.
4954
*
@@ -550,6 +555,11 @@ public function getRoles(): array
550555
and !in_array(self::ROLE_SUBJECT_MATTER_EXPERT, $roles)
551556
) {
552557
$roles[] = self::ROLE_SUBJECT_MATTER_EXPERT;
558+
} elseif (
559+
$personDataRepository->getRole()->getName() === DataRepositoryRole::DEVELOPER
560+
and !in_array(self::ROLE_DEVELOPER, $roles)
561+
) {
562+
$roles[] = self::ROLE_DEVELOPER;
553563
}
554564
}
555565
foreach ($this->getPerson()->getPersonResearchGroups() as $personResearchGroup) {

src/Entity/DataRepositoryRole.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class DataRepositoryRole extends AbstractRole implements RoleInterface
1818
// Known Data Repository Roles.
1919
const MANAGER = 'Manager';
2020
const ENGINEER = 'Engineer';
21+
const DEVELOPER = 'Developer';
2122
const SUPPORT = 'Support';
2223
const SME = 'Subject Matter Expert';
2324
}

0 commit comments

Comments
 (0)