mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
add callback to SeedDMS_Core_Document::getAccessMode()
This commit is contained in:
parent
03690b9f1e
commit
2b5f9ab3b3
|
@ -1292,6 +1292,15 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if(!$user)
|
if(!$user)
|
||||||
return M_NONE;
|
return M_NONE;
|
||||||
|
|
||||||
|
/* Check if 'onCheckAccessDocument' callback is set */
|
||||||
|
if(isset($this->_dms->callbacks['onCheckAccessDocument'])) {
|
||||||
|
foreach($this->_dms->callbacks['onCheckAccessDocument'] as $callback) {
|
||||||
|
if(($ret = call_user_func($callback[0], $callback[1], $this, $user)) > 0) {
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Administrators have unrestricted access */
|
/* Administrators have unrestricted access */
|
||||||
if ($user->isAdmin()) return M_ALL;
|
if ($user->isAdmin()) return M_ALL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user