From: hickert Date: Mon, 29 Nov 2010 09:13:37 +0000 (+0000) Subject: Updated infoPage X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b8faa063e5ff5f00e22529145bb2b9d2db3453c6;p=gosa.git Updated infoPage -Fixed welcome/infoPage handling. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20400 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/contrib/gosa.conf b/gosa-core/contrib/gosa.conf index 657684c9a..e3e1ba186 100644 --- a/gosa-core/contrib/gosa.conf +++ b/gosa-core/contrib/gosa.conf @@ -74,7 +74,7 @@ - + diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index 9fb52e0ed..8e0d14d16 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -240,6 +240,8 @@ $smarty->assign("noMenuMode", count($plist->getRegisteredMenuEntries()) == 0); if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){ $plug= validate($_GET['plug']); $plugin_dir= $plist->get_path($plug); + $plugin= $plist->get_class($plug); + session::global_set('currentPlugin',$plugin); session::global_set('plugin_dir',$plugin_dir); if ($plugin_dir == ""){ new log("security","gosa","",array(),"main.php called with invalid plug parameter \"$plug\"") ; @@ -247,18 +249,19 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){ exit; } } else { - - // Display the welcome page for admins (iconmenu) and an info page for those - // who are not allowed to adminstrate anything (user) - if(count($plist->getRegisteredMenuEntries()) == 0){ - session::global_set('plugin_dir',"infoPage"); - $plugin_dir= "$BASE_DIR/plugins/generic/infoPage"; - }else{ - session::global_set('plugin_dir',"welcome"); - $plugin_dir= "$BASE_DIR/plugins/generic/welcome"; - } + session::global_set('plugin_dir',"welcome"); + session::global_set('currentPlugin','welcome'); + $plugin_dir= "$BASE_DIR/plugins/generic/welcome"; } +// Display the welcome page for admins (iconmenu) and an info page for those +// who are not allowed to adminstrate anything (user) +if(count($plist->getRegisteredMenuEntries()) == 0 && session::global_get('currentPlugin') == "welcome"){ + session::global_set('plugin_dir',"infoPage"); + session::global_set('currentPlugin','welcome'); + $plugin_dir= "$BASE_DIR/plugins/generic/infoPage"; +} + /* Handle plugin locks. - Remove the plugin from session if we switched to another. (cleanup) - Remove all created locks if "reset" was posted. diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 80d64680e..d088d4aae 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -187,6 +187,10 @@ class pluglist $acl_to_check = trim($acl_to_check); $acl_to_check = preg_replace("/ /","",$acl_to_check); + if($acl_to_check == "none"){ + $this->silly_cache[$aclname]= TRUE; + return(TRUE); + } /* Check if the given acl tag is only valid for self acl entries * pluginList[$index]); + } + + /*! \brief This function checks if we are allowed to view the plugin with the given id * * @param $plug_id Integer The ID of the plugin.