mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
also check if user is disabled
This commit is contained in:
parent
7259c668c4
commit
9e87300567
|
@ -75,8 +75,10 @@ $tmprevs = $dms->getDocumentsInRevision();
|
|||
$docsinrevision = array();
|
||||
foreach($tmprevs as $rev) {
|
||||
if($doc = $dms->getDocument($rev['documentID'])) {
|
||||
$isdisabled = false;
|
||||
if($rev['type'] == 0) {
|
||||
$ruser = $dms->getUser($rev['required']);
|
||||
$isdisabled = $ruser->isDisabled();
|
||||
$mode = $doc->getAccessMode($ruser);
|
||||
$content = $doc->getContentByVersion($rev['version']);
|
||||
$cmode = $content->getAccessMode($ruser);
|
||||
|
@ -88,7 +90,7 @@ foreach($tmprevs as $rev) {
|
|||
/* Caution: $content->getAccessMode($ruser) doesn't work as it uses the role
|
||||
* restrictions of the currently logged in user
|
||||
*/
|
||||
if($mode < M_READ || $cmode < M_READ)
|
||||
if($mode < M_READ || $cmode < M_READ || $isdisabled)
|
||||
$docsinrevision[] = $doc;
|
||||
}
|
||||
}
|
||||
|
@ -96,8 +98,10 @@ $tmprevs = $dms->getDocumentsInReception();
|
|||
$docsinreception = array();
|
||||
foreach($tmprevs as $rev) {
|
||||
if($doc = $dms->getDocument($rev['documentID'])) {
|
||||
$isdisabled = false;
|
||||
if($rev['type'] == 0) {
|
||||
$ruser = $dms->getUser($rev['required']);
|
||||
$isdisabled = $ruser->isDisabled();
|
||||
$mode = $doc->getAccessMode($ruser);
|
||||
$content = $doc->getContentByVersion($rev['version']);
|
||||
$cmode = $content->getAccessMode($ruser);
|
||||
|
@ -109,7 +113,7 @@ foreach($tmprevs as $rev) {
|
|||
/* Caution: $content->getAccessMode($ruser) doesn't work as it uses the role
|
||||
* restrictions of the currently logged in user
|
||||
*/
|
||||
if($mode < M_READ || $cmode < M_READ)
|
||||
if($mode < M_READ || $cmode < M_READ || $isdisabled)
|
||||
$docsinreception[] = $doc;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user