Skip to content

Commit

Permalink
anotehr makk cahnge
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Nov 14, 2011
1 parent 03d3b4d commit 3e1b8dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ADRCollection.inc
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ class ADRCollection {

global $user;
module_load_include('inc', 'islandora_xacml_editor', 'Xacml');
module_load_include('inc', 'islandora_xacml_editor', 'XacmlException');
$xacml = Xacml::constructFromPid($this->pid);
$canManageInXacml = $xacml->managementRule->hasPermission($user->name, $user->roles);
try {
$canManageInXacml = $xacml->managementRule->hasPermission($user->name, $user->roles);
except(ExacmlException $e) {
$canManageInXacml = FALSE;
}

$canAddNewObject = user_access("Add Object") && $canManageInXacml;
$canAddNewCollection = user_access("Edit Subcollection") && $canManageInXacml;
Expand Down

0 comments on commit 3e1b8dc

Please sign in to comment.