|
|
@ -81,12 +81,16 @@ class SecurityClass { |
|
|
|
$roles = $xml->xpath('//default:SubjectAttributeDesignator[@AttributeId="fedoraRole"]/../default:Apply/default:AttributeValue'); |
|
|
|
$roles = $xml->xpath('//default:SubjectAttributeDesignator[@AttributeId="fedoraRole"]/../default:Apply/default:AttributeValue'); |
|
|
|
$users = $xml->xpath('//default:SubjectAttributeDesignator[@AttributeId="urn:fedora:names:fedora:2.1:subject:loginId"]/../default:Apply/default:AttributeValue'); |
|
|
|
$users = $xml->xpath('//default:SubjectAttributeDesignator[@AttributeId="urn:fedora:names:fedora:2.1:subject:loginId"]/../default:Apply/default:AttributeValue'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($roles) { |
|
|
|
foreach($roles as $role) { |
|
|
|
foreach($roles as $role) { |
|
|
|
$allowedRoles[] = (string)$role; |
|
|
|
$allowedRoles[] = (string)$role; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if($users) { |
|
|
|
foreach($users as $user) { |
|
|
|
foreach($users as $user) { |
|
|
|
$allowedUsers[] = (string)$user; |
|
|
|
$allowedUsers[] = (string)$user; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$usersAndRoles['users'] = $allowedUsers; |
|
|
|
$usersAndRoles['users'] = $allowedUsers; |
|
|
|
$usersAndRoles['roles'] = $allowedRoles; |
|
|
|
$usersAndRoles['roles'] = $allowedRoles; |
|
|
|