Skip to content

Commit

Permalink
small fixes to ui
Browse files Browse the repository at this point in the history
  • Loading branch information
axel committed Oct 31, 2021
1 parent ba3a92c commit 72aeace
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions Lib/GrouperApiAccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ public function getMembersInGroup(array $queryData) {

try {
// First verify that user has read access to group
if ($this->verifyPrivileges($queryData, 'read') === false) {
$privs = array('read', 'admin', 'update');
if ($this->verifyPrivileges($queryData, $privs) === false) {
return array(
array(
"sourceId" => "ldap",
Expand Down Expand Up @@ -305,11 +306,11 @@ public function getMembersInGroup(array $queryData) {

/**
* @param array $queryData Array of conditions for querying
* @param string $privilege attribute verifying user has set
* @param array $privilege attributes that need verifying for a user
* @return bool If user has said attribute correctly set
* @throws GrouperLiteException
*/
public function verifyPrivileges(array $queryData, string $privilege) {
public function verifyPrivileges(array $queryData, array $privileges) {
//Build request logic
$verifyPrivs = array(
"WsRestGetGrouperPrivilegesLiteRequest" => array(
Expand All @@ -329,8 +330,6 @@ public function verifyPrivileges(array $queryData, string $privilege) {
if (isset($results['WsGetGrouperPrivilegesLiteResult']['resultMetadata']['resultCode']) && $results['WsGetGrouperPrivilegesLiteResult']['resultMetadata']['resultCode'] != NULL) {
if ($results['WsGetGrouperPrivilegesLiteResult']['resultMetadata']['resultCode'] == 'SUCCESS_ALLOWED') {
return true;
} else {
return false;
}
}
} catch (Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupmember.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ $numColumns = count($columns);
</button>
</td>
</tr>
<?php if (!count($wggroup)) : ?>
<?php if (!count($wgmemberships)) : ?>
<tr class="table-light collapse collapse-wg-working-group-parent show">
<td colspan="5" class="text-center">No working groups.</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion View/GrouperGroups/groupowner.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ $numColumns = count($columns);
</button>
</td>
</tr>
<?php if (!count($wgowner)) : ?>
<?php if (!count($wgowners)) : ?>
<tr class="table-light collapse collapse-wg-working-group-parent show">
<td colspan="5" class="text-center">No working groups.</td>
</tr>
Expand Down

0 comments on commit 72aeace

Please sign in to comment.