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