mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 17:05:46 +00:00
fix access check and add new debug menu item
This commit is contained in:
parent
23e3011d82
commit
e527a6d176
|
@ -406,7 +406,7 @@ $(document).ready(function () {
|
|||
echo " <ul class=\"nav\">\n";
|
||||
// echo " <li id=\"first\"><a href=\"../out/out.ViewFolder.php?folderid=".$this->params['rootfolderid']."\">".getMLText("content")."</a></li>\n";
|
||||
// echo " <li><a href=\"../out/out.SearchForm.php?folderid=".$this->params['rootfolderid']."\">".getMLText("search")."</a></li>\n";
|
||||
if ($this->params['enablecalendar']) echo " <li><a href=\"../out/out.Calendar.php?mode=".$this->params['calendardefaultview']."\">".getMLText("calendar")."</a></li>\n";
|
||||
if ($this->params['enablecalendar'] && $this->check_access('Calendar')) echo " <li><a href=\"../out/out.Calendar.php?mode=".$this->params['calendardefaultview']."\">".getMLText("calendar")."</a></li>\n";
|
||||
if ($this->check_access('AdminTools')) echo " <li><a href=\"../out/out.AdminTools.php\">".getMLText("admin_tools")."</a></li>\n";
|
||||
if($this->params['enablehelp']) {
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
|
@ -680,15 +680,15 @@ $(document).ready(function () {
|
|||
echo " <li class=\"dropdown\">\n";
|
||||
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("user_group_management")." <i class=\"icon-caret-down\"></i></a>\n";
|
||||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('UsrMgr')))
|
||||
if ($this->check_access('UsrMgr'))
|
||||
echo " <li><a href=\"../out/out.UsrMgr.php\">".getMLText("user_management")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('RoleMgr')))
|
||||
if ($this->check_access('RoleMgr'))
|
||||
echo " <li><a href=\"../out/out.RoleMgr.php\">".getMLText("role_management")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('GroupMgr')))
|
||||
if ($this->check_access('GroupMgr'))
|
||||
echo " <li><a href=\"../out/out.GroupMgr.php\">".getMLText("group_management")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('UserList')))
|
||||
if ($this->check_access('UserList'))
|
||||
echo " <li><a href=\"../out/out.UserList.php\">".getMLText("user_list")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Acl')))
|
||||
if ($this->check_access('Acl'))
|
||||
echo " <li><a href=\"../out/out.Acl.php\">".getMLText("access_control")."</a></li>\n";
|
||||
echo " </ul>\n";
|
||||
echo " </li>\n";
|
||||
|
@ -700,18 +700,18 @@ $(document).ready(function () {
|
|||
echo " <li class=\"dropdown\">\n";
|
||||
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("definitions")." <i class=\"icon-caret-down\"></i></a>\n";
|
||||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('DefaultKeywords')))
|
||||
if ($this->check_access('DefaultKeywords'))
|
||||
echo " <li><a href=\"../out/out.DefaultKeywords.php\">".getMLText("global_default_keywords")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Categories')))
|
||||
if ($this->check_access('Categories'))
|
||||
echo " <li><a href=\"../out/out.Categories.php\">".getMLText("global_document_categories")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('AttributeMgr')))
|
||||
if ($this->check_access('AttributeMgr'))
|
||||
echo " <li><a href=\"../out/out.AttributeMgr.php\">".getMLText("global_attributedefinitions")."</a></li>\n";
|
||||
if($this->params['workflowmode'] == 'advanced') {
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('WorkflowMgr')))
|
||||
if ($this->check_access('WorkflowMgr'))
|
||||
echo " <li><a href=\"../out/out.WorkflowMgr.php\">".getMLText("global_workflows")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('WorkflowStatesMgr')))
|
||||
if ($this->check_access('WorkflowStatesMgr'))
|
||||
echo " <li><a href=\"../out/out.WorkflowStatesMgr.php\">".getMLText("global_workflow_states")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('WorkflowActionsMgr')))
|
||||
if ($this->check_access('WorkflowActionsMgr'))
|
||||
echo " <li><a href=\"../out/out.WorkflowActionsMgr.php\">".getMLText("global_workflow_actions")."</a></li>\n";
|
||||
}
|
||||
echo " </ul>\n";
|
||||
|
@ -725,11 +725,11 @@ $(document).ready(function () {
|
|||
echo " <li class=\"dropdown\">\n";
|
||||
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("fullsearch")." <i class=\"icon-caret-down\"></i></a>\n";
|
||||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Indexer')))
|
||||
if ($this->check_access('Indexer'))
|
||||
echo " <li><a href=\"../out/out.Indexer.php\">".getMLText("update_fulltext_index")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('CreateIndex')))
|
||||
if ($this->check_access('CreateIndex'))
|
||||
echo " <li><a href=\"../out/out.CreateIndex.php\">".getMLText("create_fulltext_index")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('IndexInfo')))
|
||||
if ($this->check_access('IndexInfo'))
|
||||
echo " <li><a href=\"../out/out.IndexInfo.php\">".getMLText("fulltext_info")."</a></li>\n";
|
||||
echo " </ul>\n";
|
||||
echo " </li>\n";
|
||||
|
@ -742,10 +742,10 @@ $(document).ready(function () {
|
|||
echo " <li class=\"dropdown\">\n";
|
||||
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("backup_log_management")." <i class=\"icon-caret-down\"></i></a>\n";
|
||||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('BackupTools')))
|
||||
if ($this->check_access('BackupTools'))
|
||||
echo " <li><a href=\"../out/out.BackupTools.php\">".getMLText("backup_tools")."</a></li>\n";
|
||||
if ($this->params['logfileenable'])
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('LogManagement')))
|
||||
if ($this->check_access('LogManagement'))
|
||||
echo " <li><a href=\"../out/out.LogManagement.php\">".getMLText("log_management")."</a></li>\n";
|
||||
echo " </ul>\n";
|
||||
echo " </li>\n";
|
||||
|
@ -757,23 +757,37 @@ $(document).ready(function () {
|
|||
echo " <li class=\"dropdown\">\n";
|
||||
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("misc")." <i class=\"icon-caret-down\"></i></a>\n";
|
||||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Statistic')))
|
||||
if ($this->check_access('Statistic'))
|
||||
echo " <li><a href=\"../out/out.Statistic.php\">".getMLText("folders_and_documents_statistic")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Charts')))
|
||||
if ($this->check_access('Charts'))
|
||||
echo " <li><a href=\"../out/out.Charts.php\">".getMLText("charts")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Timeline')))
|
||||
if ($this->check_access('Timeline'))
|
||||
echo " <li><a href=\"../out/out.Timeline.php\">".getMLText("timeline")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('ObjectCheck')))
|
||||
if ($this->check_access('ObjectCheck'))
|
||||
echo " <li><a href=\"../out/out.ObjectCheck.php\">".getMLText("objectcheck")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('ExtensionMgr')))
|
||||
if ($this->check_access('ImportFS'))
|
||||
echo " <li><a href=\"../out/out.ImportFS.php\">".getMLText("importfs")."</a></li>\n";
|
||||
if ($this->check_access('ExtensionMgr'))
|
||||
echo " <li><a href=\"../out/out.ExtensionMgr.php\">".getMLText("extension_manager")."</a></li>\n";
|
||||
if ($this->params['user']->isAdmin() || (isset($this->params['accessobject']) && $this->params['accessobject']->check_view_access('Info')))
|
||||
if ($this->check_access('Info'))
|
||||
echo " <li><a href=\"../out/out.Info.php\">".getMLText("version_info")."</a></li>\n";
|
||||
echo " </ul>\n";
|
||||
echo " </li>\n";
|
||||
echo " </ul>\n";
|
||||
}
|
||||
|
||||
if($this->check_access(array('Hooks'))) {
|
||||
echo " <ul class=\"nav\">\n";
|
||||
echo " <li class=\"dropdown\">\n";
|
||||
echo " <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">".getMLText("debug")." <i class=\"icon-caret-down\"></i></a>\n";
|
||||
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
|
||||
if ($this->check_access('Hooks'))
|
||||
echo " <li><a href=\"../out/out.Hooks.php\">".getMLText("list_hooks")."</a></li>\n";
|
||||
echo " </ul>\n";
|
||||
echo " </li>\n";
|
||||
echo " </ul>\n";
|
||||
}
|
||||
|
||||
echo "<ul class=\"nav\">\n";
|
||||
echo "</ul>\n";
|
||||
echo "</div>\n";
|
||||
|
|
Loading…
Reference in New Issue
Block a user