mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add method check_view_lecacy_access()
which does the legacy access checking if advanded acl is turned off
This commit is contained in:
parent
270770782f
commit
43f57637e7
|
@ -406,6 +406,108 @@ class SeedDMS_AccessOperation {
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
protected function check_view_lecacy_access($view, $get=array()) { /* {{{ */
|
||||||
|
if($this->user->isAdmin())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(is_string($view)) {
|
||||||
|
$scripts = array($view);
|
||||||
|
} elseif(is_array($view)) {
|
||||||
|
$scripts = $view;
|
||||||
|
} elseif(is_subclass_of($view, 'SeedDMS_View_Common')) {
|
||||||
|
$scripts = array($view->getParam('class'));
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(array_intersect($scripts, array(
|
||||||
|
'AddDocument',
|
||||||
|
'AddEvent',
|
||||||
|
'AddFile',
|
||||||
|
'AddSubFolder',
|
||||||
|
'AddToTransmittal',
|
||||||
|
'ApprovalSummary',
|
||||||
|
'ApproveDocument',
|
||||||
|
'Calendar',
|
||||||
|
'CategoryChooser',
|
||||||
|
'ChangePassword',
|
||||||
|
'CheckInDocument',
|
||||||
|
'Clipboard',
|
||||||
|
'DocumentAccess',
|
||||||
|
'DocumentChooser',
|
||||||
|
'DocumentNotify',
|
||||||
|
'DocumentVersionDetail',
|
||||||
|
'DropFolderChooser',
|
||||||
|
'EditAttributes',
|
||||||
|
'EditComment',
|
||||||
|
'EditDocumentFile',
|
||||||
|
'EditDocument',
|
||||||
|
'EditEvent',
|
||||||
|
'EditFolder',
|
||||||
|
'EditOnline',
|
||||||
|
'EditUserData',
|
||||||
|
'ErrorDlg',
|
||||||
|
'FolderAccess',
|
||||||
|
'FolderChooser',
|
||||||
|
'FolderNotify',
|
||||||
|
'ForcePasswordChange',
|
||||||
|
'GroupView',
|
||||||
|
'Help',
|
||||||
|
'Info',
|
||||||
|
'KeywordChooser',
|
||||||
|
'Login',
|
||||||
|
'ManageNotify',
|
||||||
|
'MoveDocument',
|
||||||
|
'MoveFolder',
|
||||||
|
'MyAccount',
|
||||||
|
'MyDocuments',
|
||||||
|
'OpensearchDesc',
|
||||||
|
'OverrideContentStatus',
|
||||||
|
'PasswordForgotten',
|
||||||
|
'PasswordSend',
|
||||||
|
'ReceiptDocument',
|
||||||
|
'ReceiptSummary',
|
||||||
|
'RemoveDocumentFile',
|
||||||
|
'RemoveDocument',
|
||||||
|
'RemoveEvent',
|
||||||
|
'RemoveFolderFiles',
|
||||||
|
'RemoveFolder',
|
||||||
|
'RemoveTransmittal',
|
||||||
|
'RemoveVersion',
|
||||||
|
'RemoveWorkflowFromDocument',
|
||||||
|
'ReturnFromSubWorkflow',
|
||||||
|
'ReviewDocument',
|
||||||
|
'ReviewSummary',
|
||||||
|
'ReviseDocument',
|
||||||
|
'RewindWorkflow',
|
||||||
|
'RunSubWorkflow',
|
||||||
|
'SearchForm',
|
||||||
|
'Search',
|
||||||
|
'Session',
|
||||||
|
'SetExpires',
|
||||||
|
'SetRecipients',
|
||||||
|
'SetReviewersApprovers',
|
||||||
|
'SetRevisors',
|
||||||
|
'SetWorkflow',
|
||||||
|
'SubstituteUser',
|
||||||
|
'TimelineFeed',
|
||||||
|
'Timeline',
|
||||||
|
'TransmittalMgr',
|
||||||
|
'TriggerWorkflow',
|
||||||
|
'UpdateDocument',
|
||||||
|
'UserDefaultKeywords',
|
||||||
|
'UserImage',
|
||||||
|
'UserList',
|
||||||
|
'UsrView',
|
||||||
|
'ViewDocument',
|
||||||
|
'ViewEvent',
|
||||||
|
'ViewFolder',
|
||||||
|
'WorkflowGraph',
|
||||||
|
'WorkflowSummary')))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check for access permission on view
|
* Check for access permission on view
|
||||||
*
|
*
|
||||||
|
@ -426,10 +528,7 @@ class SeedDMS_AccessOperation {
|
||||||
*/
|
*/
|
||||||
function check_view_access($view, $get=array()) { /* {{{ */
|
function check_view_access($view, $get=array()) { /* {{{ */
|
||||||
if(!$this->settings->_advancedAcl) {
|
if(!$this->settings->_advancedAcl) {
|
||||||
if($this->user->isAdmin())
|
return $this->check_view_lecacy_access($view, $get);
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if(is_string($view)) {
|
if(is_string($view)) {
|
||||||
$scripts = array($view);
|
$scripts = array($view);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user