Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix group listing for shared users when inside a group
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Apr 29, 2015
1 parent bc86aad commit a9fdc8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -1383,7 +1383,12 @@ public function computeSharedRepositoryAccessRights($repoId, $mixUsersAndGroups,
$ID = $userId;
}else if(strpos($rId, "AJXP_GRP_/") === 0){
if(empty($loadedGroups)){
$baseGroup = AuthService::filterBaseGroup("/");
$loadedGroups = AuthService::listChildrenGroups();
foreach($loadedGroups as $loadedG => $loadedLabel){
unset($loadedGroups[$loadedG]);
$loadedGroups[rtrim($baseGroup, "/")."/".ltrim($loadedG, "/")] = $loadedLabel;
}
}
$groupId = substr($rId, strlen('AJXP_GRP_'));
if(isSet($loadedGroups[$groupId])) {
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/core.conf/class.AbstractConfDriver.php
Expand Up @@ -1112,7 +1112,7 @@ public function switchAction($action, $httpVars, $fileVars)
case 'group':
$authGroups = AuthService::listChildrenGroups($baseGroup);
foreach ($authGroups as $gId => $gName) {
$allGroups["AJXP_GRP_" . AuthService::filterBaseGroup($gId)] = $gName;
$allGroups["AJXP_GRP_" . rtrim($baseGroup, "/")."/".ltrim($gId, "/")] = $gName;
}
break;
case 'role':
Expand All @@ -1122,7 +1122,7 @@ public function switchAction($action, $httpVars, $fileVars)
$groups = array();
$authGroups = AuthService::listChildrenGroups($baseGroup);
foreach ($authGroups as $gId => $gName) {
$groups["AJXP_GRP_" . AuthService::filterBaseGroup($gId)] = $gName;
$groups["AJXP_GRP_" . rtrim($baseGroup, "/")."/".ltrim($gId, "/")] = $gName;
}
$roles = $this->getUserRoleList($loggedUser, $rolePrefix, $includeString, $excludeString, $listRoleType);

Expand Down

0 comments on commit a9fdc8c

Please sign in to comment.