diff --git a/LEAF-Automated-Tests b/LEAF-Automated-Tests index 32f13e0a7..e31c4af1c 160000 --- a/LEAF-Automated-Tests +++ b/LEAF-Automated-Tests @@ -1 +1 @@ -Subproject commit 32f13e0a7331fd9135dd398abdbe5272d3cdcd57 +Subproject commit e31c4af1cc97f0ac1bd42adce95756ddf52b0a2b diff --git a/LEAF_Nexus/index.php b/LEAF_Nexus/index.php index ddb4c3fec..aa8ca6ac1 100644 --- a/LEAF_Nexus/index.php +++ b/LEAF_Nexus/index.php @@ -370,6 +370,15 @@ function customTemplate($tpl) $privilegesArray[$key] = array_map('App\Leaf\XSSHelpers::sanitizeHTML', $privilegesArray[$key]); } + $memberships = $oc_login->getMembership(); + $isAdmin = false; + if (isset($memberships['groupID'][1])) + { + $isAdmin = true; + } + + $t_form->assign('is_admin', $isAdmin); + $t_form->assign('indicatorID', (int)$_GET['indicatorID']); $t_form->assign('UID', (int)$_GET['UID']); $t_form->assign('indicator', $indicatorArray); @@ -382,7 +391,7 @@ function customTemplate($tpl) break; case 'view_group_permissions': $group = new Orgchart\Group($oc_db, $oc_login); - + $t_form = new \Smarty; $t_form->left_delimiter = ''; @@ -401,6 +410,15 @@ function customTemplate($tpl) 'css/view_group.css', )); $groupID = isset($_GET['groupID']) ? (int)$_GET['groupID'] : 0; + + $memberships = $oc_login->getMembership(); + $isAdmin = false; + if (isset($memberships['groupID'][1])) + { + $isAdmin = true; + } + + $t_form->assign('is_admin', $isAdmin); $t_form->assign('groupID', $groupID); $t_form->assign('groupTitle', $group->getTitle($groupID)); $t_form->assign('permissions', $group->getPrivileges($groupID)); @@ -431,6 +449,15 @@ function customTemplate($tpl) 'css/view_group.css', )); $positionID = isset($_GET['positionID']) ? (int)$_GET['positionID'] : 0; + + $memberships = $oc_login->getMembership(); + $isAdmin = false; + if (isset($memberships['groupID'][1])) + { + $isAdmin = true; + } + + $t_form->assign('is_admin', $isAdmin); $t_form->assign('positionID', $positionID); $t_form->assign('positionTitle', $position->getTitle($positionID)); $t_form->assign('permissions', $position->getPrivileges($positionID)); diff --git a/LEAF_Nexus/templates/view_group_permissions.tpl b/LEAF_Nexus/templates/view_group_permissions.tpl index 7da1e1da5..60aed73c6 100644 --- a/LEAF_Nexus/templates/view_group_permissions.tpl +++ b/LEAF_Nexus/templates/view_group_permissions.tpl @@ -35,7 +35,7 @@ Grant - + Loading ... diff --git a/LEAF_Nexus/templates/view_permissions.tpl b/LEAF_Nexus/templates/view_permissions.tpl index aa24dbd10..928f870f6 100644 --- a/LEAF_Nexus/templates/view_permissions.tpl +++ b/LEAF_Nexus/templates/view_permissions.tpl @@ -35,7 +35,8 @@ Grant - + + Loading ... @@ -49,6 +50,7 @@
+ Yes diff --git a/LEAF_Nexus/templates/view_position_permissions.tpl b/LEAF_Nexus/templates/view_position_permissions.tpl index e50aecd1b..d611cb49f 100644 --- a/LEAF_Nexus/templates/view_position_permissions.tpl +++ b/LEAF_Nexus/templates/view_position_permissions.tpl @@ -32,7 +32,7 @@ Grant - + Loading ...