mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
check paramert $mode of addAccess() has valid value
This commit is contained in:
parent
85f838b354
commit
2c7b7344dd
|
@ -1023,6 +1023,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
function addAccess($mode, $userOrGroupID, $isUser) { /* {{{ */
|
function addAccess($mode, $userOrGroupID, $isUser) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
|
if($mode < M_NONE || $mode > M_ALL)
|
||||||
|
return false;
|
||||||
|
|
||||||
$userOrGroup = ($isUser) ? "`userID`" : "`groupID`";
|
$userOrGroup = ($isUser) ? "`userID`" : "`groupID`";
|
||||||
|
|
||||||
$queryStr = "INSERT INTO `tblACLs` (`target`, `targetType`, ".$userOrGroup.", `mode`) VALUES
|
$queryStr = "INSERT INTO `tblACLs` (`target`, `targetType`, ".$userOrGroup.", `mode`) VALUES
|
||||||
|
|
Loading…
Reference in New Issue
Block a user