mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
- use highest access right if user is member of several groups
This commit is contained in:
parent
8d22e2635d
commit
02dc5e7215
|
@ -709,12 +709,14 @@ class LetoDMS_Core_Document { /* {{{ */
|
|||
return $userAccess->getMode();
|
||||
}
|
||||
}
|
||||
$result = $this->getDefaultAccess();
|
||||
foreach ($accessList["groups"] as $groupAccess) {
|
||||
if ($user->isMemberOfGroup($groupAccess->getGroup())) {
|
||||
return $groupAccess->getMode();
|
||||
if ($groupAccess->getMode()>$result)
|
||||
$result = $groupAccess->getMode();
|
||||
}
|
||||
}
|
||||
return $this->getDefaultAccess();
|
||||
return $result;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
|
@ -717,12 +717,14 @@ class LetoDMS_Core_Folder {
|
|||
return $userAccess->getMode();
|
||||
}
|
||||
}
|
||||
$result = $this->getDefaultAccess();
|
||||
foreach ($accessList["groups"] as $groupAccess) {
|
||||
if ($user->isMemberOfGroup($groupAccess->getGroup())) {
|
||||
return $groupAccess->getMode();
|
||||
if ($groupAccess->getMode()>$result)
|
||||
$result = $groupAccess->getMode();
|
||||
}
|
||||
}
|
||||
return $this->getDefaultAccess();
|
||||
return $result;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user