| @@ 94-104 (lines=11) @@ | ||
| 91 | * @param InstitutionRole $role |
|
| 92 | * @return array |
|
| 93 | */ |
|
| 94 | private function getAllowedInstitutionRoles(InstitutionRole $role) |
|
| 95 | { |
|
| 96 | switch (true) { |
|
| 97 | case $role->equals(InstitutionRole::useRa()): |
|
| 98 | return [InstitutionRole::ROLE_USE_RA]; |
|
| 99 | case $role->equals(InstitutionRole::useRaa()): |
|
| 100 | return [InstitutionRole::ROLE_USE_RAA]; |
|
| 101 | default: |
|
| 102 | return []; |
|
| 103 | } |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * This is the mapping to look up allowed identity roles for a specific institution role |
|
| @@ 114-124 (lines=11) @@ | ||
| 111 | * @param InstitutionRole $role |
|
| 112 | * @return array |
|
| 113 | */ |
|
| 114 | private function getAllowedIdentityRoles(InstitutionRole $role) |
|
| 115 | { |
|
| 116 | switch (true) { |
|
| 117 | case $role->equals(InstitutionRole::useRa()): |
|
| 118 | return [AuthorityRole::ROLE_RA, AuthorityRole::ROLE_RAA]; |
|
| 119 | case $role->equals(InstitutionRole::useRaa()): |
|
| 120 | return [AuthorityRole::ROLE_RAA]; |
|
| 121 | default: |
|
| 122 | return []; |
|
| 123 | } |
|
| 124 | } |
|
| 125 | } |
|
| 126 | ||