Browse Source

修复特定条件下 为用户组授权 用户无法看到被授权仓库的bug

docker-svn v2.2.1
witersen 3 years ago
parent
commit
a510e9d0d0
  1. 8
      02.php/app/controller/svnserve.class.php

8
02.php/app/controller/svnserve.class.php

@ -894,7 +894,9 @@ class Svnserve extends Controller
//查看用户本身的仓库 //查看用户本身的仓库
$userRepList = FunGetUserPriRepListWithoutPri($authzContent, $this->this_username, '/'); $userRepList = FunGetUserPriRepListWithoutPri($authzContent, $this->this_username, '/');
$allRepList = array_merge($userRepList, $allRepList); if ($userRepList != null) {
$allRepList = array_merge($userRepList, $allRepList);
}
//查看用户所在所有分组的仓库 //查看用户所在所有分组的仓库
$groupUserList = FunGetSvnGroupUserList($authzContent); $groupUserList = FunGetSvnGroupUserList($authzContent);
@ -903,14 +905,14 @@ class Svnserve extends Controller
//获取当前用户组有权限的仓库列表 //获取当前用户组有权限的仓库列表
$groupRepList = FunGetGroupPriRepListWithoutPri($authzContent, $key); $groupRepList = FunGetGroupPriRepListWithoutPri($authzContent, $key);
if ($groupRepList != null) { if ($groupRepList != null) {
$allRepList = array_merge($allRepList, $groupRepList); $allRepList = array_merge($groupRepList, $allRepList);
} }
} }
} }
//处理 //处理
if ($allRepList == null) { if ($allRepList == null) {
$repArray = null; $repArray = array();
$total = 0; $total = 0;
} else { } else {
foreach ($repArray as $key => $value) { foreach ($repArray as $key => $value) {

Loading…
Cancel
Save