| @@ 129-139 (lines=11) @@ | ||
| 126 | * @param InstitutionRole $role |
|
| 127 | * @return array |
|
| 128 | */ |
|
| 129 | private function getAllowedInstitutionRoles(InstitutionRole $role) |
|
| 130 | { |
|
| 131 | switch (true) { |
|
| 132 | case $role->equals(InstitutionRole::useRa()): |
|
| 133 | return [InstitutionRole::ROLE_USE_RA]; |
|
| 134 | case $role->equals(InstitutionRole::useRaa()): |
|
| 135 | return [InstitutionRole::ROLE_USE_RAA]; |
|
| 136 | default: |
|
| 137 | return []; |
|
| 138 | } |
|
| 139 | } |
|
| 140 | ||
| 141 | /** |
|
| 142 | * This is the mapping to look up allowed identity roles for a specific institution role |
|
| @@ 149-159 (lines=11) @@ | ||
| 146 | * @param InstitutionRole $role |
|
| 147 | * @return array |
|
| 148 | */ |
|
| 149 | private function getAllowedIdentityRoles(InstitutionRole $role) |
|
| 150 | { |
|
| 151 | switch (true) { |
|
| 152 | case $role->equals(InstitutionRole::useRa()): |
|
| 153 | return [AuthorityRole::ROLE_RA, AuthorityRole::ROLE_RAA]; |
|
| 154 | case $role->equals(InstitutionRole::useRaa()): |
|
| 155 | return [AuthorityRole::ROLE_RAA]; |
|
| 156 | default: |
|
| 157 | return []; |
|
| 158 | } |
|
| 159 | } |
|
| 160 | } |
|
| 161 | ||