check paramert $mode of addAccess() has valid value

This commit is contained in:
Uwe Steinmann 2021-09-24 10:06:41 +02:00
parent 85f838b354
commit 2c7b7344dd

View File

@ -1023,6 +1023,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
function addAccess($mode, $userOrGroupID, $isUser) { /* {{{ */
$db = $this->_dms->getDB();
if($mode < M_NONE || $mode > M_ALL)
return false;
$userOrGroup = ($isUser) ? "`userID`" : "`groupID`";
$queryStr = "INSERT INTO `tblACLs` (`target`, `targetType`, ".$userOrGroup.", `mode`) VALUES