diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index e2ea94d18..abf9207fc 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -281,6 +281,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; */ function __menuTasks($tasks) { /* {{{ */ $dms = $this->params['dms']; + $accessobject = $this->params['accessobject']; $content = ''; // $content .= " \n"; $content .= " \n"; } - if ($this->check_access('MyDocuments')) { + if ($accessobject->check_view_access('MyDocuments')) { $content .= "
  • \n"; $content .= "
  • ".getMLText("my_documents")."
  • \n"; } @@ -342,6 +343,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function globalNavigation($folder=null) { /* {{{ */ $dms = $this->params['dms']; + $accessobject = $this->params['accessobject']; echo "
    \n"; echo "
    \n"; echo "
    \n"; @@ -359,11 +361,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
      \n"; if (!$this->params['user']->isGuest()) { $menuitems = array(); - if ($this->check_access('MyDocuments')) + if ($accessobject->check_view_access('MyDocuments')) $menuitems['my_documents'] = array('link'=>"../out/out.MyDocuments.php", 'label'=>'my_documents'); - if ($this->check_access('MyAccount')) + if ($accessobject->check_view_access('MyAccount')) $menuitems['my_account'] = array('link'=>"../out/out.MyAccount.php", 'label'=>'my_account'); - if ($this->check_access('TransmittalMgr')) + if ($accessobject->check_view_access('TransmittalMgr')) $menuitems['my_transmittals'] = array('link'=>"../out/out.TransmittalMgr.php", 'label'=>'my_transmittals'); $hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap'); foreach($hookObjs as $hookObj) { @@ -453,8 +455,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
        \n"; // echo "
      • params['rootfolderid']."\">".getMLText("content")."
      • \n"; // echo "
      • params['rootfolderid']."\">".getMLText("search")."
      • \n"; - if ($this->params['enablecalendar'] && $this->check_access('Calendar')) echo "
      • params['calendardefaultview']."\">".getMLText("calendar")."
      • \n"; - if ($this->check_access('AdminTools')) echo "
      • ".getMLText("admin_tools")."
      • \n"; + if ($this->params['enablecalendar'] && $accessobject->check_view_access('Calendar')) echo "
      • params['calendardefaultview']."\">".getMLText("calendar")."
      • \n"; + if ($accessobject->check_view_access('AdminTools')) echo "
      • ".getMLText("admin_tools")."
      • \n"; if($this->params['enablehelp']) { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); echo "
      • ".getMLText("help")."
      • \n"; @@ -572,6 +574,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; private function folderNavigationBar($folder) { /* {{{ */ $dms = $this->params['dms']; + $accessobject = $this->params['accessobject']; if (!is_object($folder) || !$folder->isType('folder')) { echo "
          \n"; echo "
        \n"; @@ -585,12 +588,13 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems = array(); if ($accessMode == M_READ && !$this->params['user']->isGuest()) { + if ($accessobject->check_view_access('FolderNotify')) $menuitems['edit_folder_notify'] = array('link'=>"../out/out.FolderNotify.php?folderid=".$folderID."&showtree=".showtree(), 'label'=>'edit_folder_notify'); } else if ($accessMode >= M_READWRITE) { - if ($this->check_access('AddSubFolder')) + if ($accessobject->check_view_access('AddSubFolder')) $menuitems['add_subfolder'] = array('link'=>"../out/out.AddSubFolder.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_subfolder'); - if ($this->check_access('AddDocument')) + if ($accessobject->check_view_access('AddDocument')) $menuitems['add_document'] = array('link'=>"../out/out.AddDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_document'); if(0 && $this->params['enablelargefileupload']) $menuitems['add_multiple_documents'] = array('link'=>"../out/out.AddMultiDocument.php?folderid=". $folderID ."&showtree=".showtree(), 'label'=>'add_multiple_documents'); @@ -623,6 +627,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ private function documentNavigationBar($document) { /* {{{ */ + $accessobject = $this->params['accessobject']; $accessMode = $document->getAccessMode($this->params['user']); $docid=".php?documentid=" . $document->getID(); echo "".getMLText("document")."\n"; @@ -667,7 +672,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } if ($accessMode == M_ALL) { $menuitems['rm_document'] = array('link'=>"../out/out.RemoveDocument".$docid, 'label'=>'rm_document'); - if ($this->check_access('DocumentAccess')) + if ($accessobject->check_view_access('DocumentAccess')) $menuitems['edit_document_access'] = array('link'=>"../out/out.DocumentAccess". $docid, 'label'=>'edit_document_access'); } if ($accessMode >= M_READ && !$this->params['user']->isGuest()) { @@ -701,6 +706,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ private function accountNavigationBar() { /* {{{ */ + $accessobject = $this->params['accessobject']; echo "".getMLText("my_account")."\n"; echo "
        \n"; echo "
          \n"; @@ -717,9 +723,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $menuitems['2_factor_auth'] = array('link'=>"../out/out.Setup2Factor.php", 'label'=>'edit_existing_notify'); if ($this->params['enableusersview']){ - if ($this->check_access('UsrView')) + if ($accessobject->check_view_access('UsrView')) $menuitems['users'] = array('link'=>"../out/out.UsrView.php", 'label'=>'users'); - if ($this->check_access('GroupView')) + if ($accessobject->check_view_access('GroupView')) $menuitems['groups'] = array('link'=>"../out/out.GroupView.php", 'label'=>'groups'); } @@ -735,6 +741,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ private function myDocumentsNavigationBar() { /* {{{ */ + $accessobject = $this->params['accessobject']; echo "".getMLText("my_documents")."\n"; echo "
          \n"; @@ -763,91 +770,92 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } /* }}} */ private function adminToolsNavigationBar() { /* {{{ */ + $accessobject = $this->params['accessobject']; echo " ".getMLText("admin_tools")."\n"; echo "
          \n"; echo "
            \n"; - if($this->check_access(array('UsrMgr', 'RoleMgr', 'GroupMgr', 'UserList', 'Acl'))) { + if($accessobject->check_view_access(array('UsrMgr', 'RoleMgr', 'GroupMgr', 'UserList', 'Acl'))) { $menuitems = array(); $menuitems['user_group_management'] = array('link'=>"#", 'label'=>'user_group_management'); - if ($this->check_access('UsrMgr')) + if ($accessobject->check_view_access('UsrMgr')) $menuitems['user_group_management']['children']['user_management'] = array('link'=>"../out/out.UsrMgr.php", 'label'=>'user_management'); - if ($this->check_access('RoleMgr')) + if ($accessobject->check_view_access('RoleMgr')) $menuitems['user_group_management']['children']['role_management'] = array('link'=>"../out/out.RoleMgr.php", 'label'=>'role_management'); - if ($this->check_access('GroupMgr')) + if ($accessobject->check_view_access('GroupMgr')) $menuitems['user_group_management']['children']['group_management'] = array('link'=>"../out/out.GroupMgr.php", 'label'=>'group_management'); - if ($this->check_access('UserList')) + if ($accessobject->check_view_access('UserList')) $menuitems['user_group_management']['children']['user_list'] = array('link'=>"../out/out.UserList.php", 'label'=>'user_list'); - if ($this->check_access('Acl')) + if ($accessobject->check_view_access('Acl')) $menuitems['user_group_management']['children']['access_control'] = array('link'=>"../out/out.Acl.php", 'label'=>'access_control'); } - if($this->check_access(array('DefaultKeywords', 'Categories', 'AttributeMgr', 'WorkflowMgr', 'WorkflowStatesMgr', 'WorkflowActionsMgr'))) { + if($accessobject->check_view_access(array('DefaultKeywords', 'Categories', 'AttributeMgr', 'WorkflowMgr', 'WorkflowStatesMgr', 'WorkflowActionsMgr'))) { $menuitems['definitions'] = array('link'=>"#", 'label'=>'definitions'); - if ($this->check_access('DefaultKeywords')) + if ($accessobject->check_view_access('DefaultKeywords')) $menuitems['definitions']['children']['default_keywords'] = array('link'=>"../out/out.DefaultKeywords.php", 'label'=>'global_default_keywords'); - if ($this->check_access('Categories')) + if ($accessobject->check_view_access('Categories')) $menuitems['definitions']['children']['document_categories'] = array('link'=>"../out/out.Categories.php", 'label'=>'global_document_categories'); - if ($this->check_access('AttributeMgr')) + if ($accessobject->check_view_access('AttributeMgr')) $menuitems['definitions']['children']['attribute_definitions'] = array('link'=>"../out/out.AttributeMgr.php", 'label'=>'global_attributedefinitions'); if($this->params['workflowmode'] == 'advanced') { - if ($this->check_access('WorkflowMgr')) + if ($accessobject->check_view_access('WorkflowMgr')) $menuitems['definitions']['children']['workflows'] = array('link'=>"../out/out.WorkflowMgr.php", 'label'=>'global_workflows'); - if ($this->check_access('WorkflowStatesMgr')) + if ($accessobject->check_view_access('WorkflowStatesMgr')) $menuitems['definitions']['children']['workflow_states'] = array('link'=>"../out/out.WorkflowStatesMgr.php", 'label'=>'global_workflow_states'); - if ($this->check_access('WorkflowActionsMgr')) + if ($accessobject->check_view_access('WorkflowActionsMgr')) $menuitems['definitions']['children']['workflow_actions'] = array('link'=>"../out/out.WorkflowActionsMgr.php", 'label'=>'global_workflow_actions'); } } if($this->params['enablefullsearch']) { - if($this->check_access(array('Indexer', 'CreateIndex', 'IndexInfo'))) { + if($accessobject->check_view_access(array('Indexer', 'CreateIndex', 'IndexInfo'))) { $menuitems['fulltext'] = array('link'=>"#", 'label'=>'fullsearch'); - if ($this->check_access('Indexer')) + if ($accessobject->check_view_access('Indexer')) $menuitems['fulltext']['children']['update_fulltext_index'] = array('link'=>"../out/out.Indexer.php", 'label'=>'update_fulltext_index'); - if ($this->check_access('CreateIndex')) + if ($accessobject->check_view_access('CreateIndex')) $menuitems['fulltext']['children']['create_fulltext_index'] = array('link'=>"../out/out.CreateIndex.php", 'label'=>'create_fulltext_index'); - if ($this->check_access('IndexInfo')) + if ($accessobject->check_view_access('IndexInfo')) $menuitems['fulltext']['children']['fulltext_info'] = array('link'=>"../out/out.IndexInfo.php", 'label'=>'fulltext_info'); } } - if($this->check_access(array('BackupTools', 'LogManagement'))) { + if($accessobject->check_view_access(array('BackupTools', 'LogManagement'))) { $menuitems['backup_log_management'] = array('link'=>"#", 'label'=>'backup_log_management'); - if ($this->check_access('BackupTools')) + if ($accessobject->check_view_access('BackupTools')) $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.BackupTools.php", 'label'=>'backup_tools'); if ($this->params['logfileenable']) - if ($this->check_access('LogManagement')) + if ($accessobject->check_view_access('LogManagement')) $menuitems['backup_log_management']['children'][] = array('link'=>"../out/out.LogManagement.php", 'label'=>'log_management'); } - if($this->check_access(array('Statistic', 'Charts', 'Timeline', 'ObjectCheck', 'ExtensionMgr', 'Info'))) { + if($accessobject->check_view_access(array('Statistic', 'Charts', 'Timeline', 'ObjectCheck', 'ExtensionMgr', 'Info'))) { $menuitems['misc'] = array('link'=>"#", 'label'=>'misc'); - if ($this->check_access('ImportFS')) + if ($accessobject->check_view_access('ImportFS')) $menuitems['misc']['children']['import_fs'] = array('link'=>"../out/out.ImportFS.php", 'label'=>'import_fs'); - if ($this->check_access('Statistic')) + if ($accessobject->check_view_access('Statistic')) $menuitems['misc']['children']['folders_and_documents_statistic'] = array('link'=>"../out/out.Statistic.php", 'label'=>'folders_and_documents_statistic'); - if ($this->check_access('Charts')) + if ($accessobject->check_view_access('Charts')) $menuitems['misc']['children']['charts'] = array('link'=>"../out/out.Charts.php", 'label'=>'charts'); - if ($this->check_access('Timeline')) + if ($accessobject->check_view_access('Timeline')) $menuitems['misc']['children']['timeline'] = array('link'=>"../out/out.Timeline.php", 'label'=>'timeline'); - if ($this->check_access('SchedulerTaskMgr')) + if ($accessobject->check_view_access('SchedulerTaskMgr')) $menuitems['misc']['children']['schedulertaskmgr'] = array('link'=>"../out/out.SchedulerTaskMgr.php", 'label'=>'scheduler_task_mgr'); - if ($this->check_access('ObjectCheck')) + if ($accessobject->check_view_access('ObjectCheck')) $menuitems['misc']['children']['objectcheck'] = array('link'=>"../out/out.ObjectCheck.php", 'label'=>'objectcheck'); - if ($this->check_access('ExpiredDocuments')) + if ($accessobject->check_view_access('ExpiredDocuments')) $menuitems['misc']['children']['documents_expired'] = array('link'=>"../out/out.ExpiredDocuments.php", 'label'=>'documents_expired'); - if ($this->check_access('ExtensionMgr')) + if ($accessobject->check_view_access('ExtensionMgr')) $menuitems['misc']['children']['extension_manager'] = array('link'=>"../out/out.ExtensionMgr.php", 'label'=>'extension_manager'); - if ($this->check_access('ClearCache')) + if ($accessobject->check_view_access('ClearCache')) $menuitems['misc']['children']['clear_cache'] = array('link'=>"../out/out.ClearCache.php", 'label'=>'clear_cache'); - if ($this->check_access('Info')) + if ($accessobject->check_view_access('Info')) $menuitems['misc']['children']['version_info'] = array('link'=>"../out/out.Info.php", 'label'=>'version_info'); } - if($this->check_access(array('Hooks'))) { + if($accessobject->check_view_access(array('Hooks'))) { $menuitems['debug'] = array('link'=>"#", 'label'=>'debug'); - if ($this->check_access('Hooks')) + if ($accessobject->check_view_access('Hooks')) $menuitems['debug']['children']['hooks'] = array('link'=>"../out/out.Hooks.php", 'label'=>'list_hooks'); }