From f02e0ca97741667d99377017f734030838dcbba1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 12 Dec 2020 16:26:21 +0100 Subject: [PATCH] add more documentation --- SeedDMS_Core/Core/inc.ClassDocument.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 5a0d00bcc..343b0c94b 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2460,6 +2460,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $groupIDs = ""; $defAccess = $this->getDefaultAccess(); + /* Check if the default access is < read access or >= read access. + * If default access is less than read access, then create a list + * of users and groups with read access. + * If default access is equal or greater then read access, then + * create a list of users and groups without read access. + */ if ($defAccessgetAccessList(M_NONE, O_LTEQ); } + /** @var SeedDMS_Core_GroupAccess $groupAccess */ foreach ($tmpList["groups"] as $groupAccess) { $groupIDs .= (strlen($groupIDs)==0 ? "" : ", ") . $groupAccess->getGroupID(); } + + /** @var SeedDMS_Core_UserAccess $userAccess */ foreach ($tmpList["users"] as $userAccess) { $user = $userAccess->getUser(); if (!$listadmin && $user->isAdmin()) continue; @@ -2504,7 +2513,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ (strlen($userIDs) == 0 ? "" : " OR (`tblUsers`.`id` IN (". $userIDs ."))"). ") ORDER BY `login`"; } - /* If default access is equal or greater then M_READ, $userIDs and + /* If default access is equal or greater than M_READ, $userIDs and * $groupIDs contains a list of user without read access */ else {