fix () : display all organizations when the user is the owner

parent 8f41a527
Pipeline #7014 canceled with stages
......@@ -276,12 +276,6 @@ class organization
foreach ($organizationList as $organization) {
$parentOrgId = (string)$organization->parentOrgId;
if ($user->ownerOrgId && $organization->ownerOrgId != $user->ownerOrgId) {
if (empty($parentOrgId) && $organization->orgId != $user->ownerOrgId) {
continue;
}
}
if (empty($parentOrgId) && $owner) {
$tree[] = $organization;
continue;
......@@ -292,6 +286,12 @@ class organization
continue;
}
if ($user->ownerOrgId && $organization->ownerOrgId != $user->ownerOrgId) {
if (empty($parentOrgId) && $organization->orgId != $user->ownerOrgId) {
continue;
}
}
if (!isset($organizationByParent[$parentOrgId])) {
$organizationByParent[$parentOrgId] = array();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment