mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
parent
b1e3519353
commit
6a00eaf34d
@ -479,6 +479,22 @@ class User
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load and return this user's navigation configuration
|
||||||
|
*
|
||||||
|
* @return Config
|
||||||
|
*/
|
||||||
|
public function loadNavigationConfig()
|
||||||
|
{
|
||||||
|
return Config::fromIni(
|
||||||
|
Config::resolvePath('preferences')
|
||||||
|
. DIRECTORY_SEPARATOR
|
||||||
|
. $this->getUsername()
|
||||||
|
. DIRECTORY_SEPARATOR
|
||||||
|
. 'navigation.ini'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load and return this user's configured navigation of the given type
|
* Load and return this user's configured navigation of the given type
|
||||||
*
|
*
|
||||||
@ -488,14 +504,8 @@ class User
|
|||||||
*/
|
*/
|
||||||
public function getNavigation($type)
|
public function getNavigation($type)
|
||||||
{
|
{
|
||||||
$config = Config::fromIni(
|
$config = $this->loadNavigationConfig();
|
||||||
Config::resolvePath('preferences')
|
$config->getConfigObject()->setKeyColumn('name');
|
||||||
. DIRECTORY_SEPARATOR
|
|
||||||
. $this->getUsername()
|
|
||||||
. DIRECTORY_SEPARATOR
|
|
||||||
. 'navigation.ini'
|
|
||||||
)->getConfigObject();
|
|
||||||
$config->setKeyColumn('name');
|
|
||||||
|
|
||||||
$navigation = new Navigation();
|
$navigation = new Navigation();
|
||||||
if ($type === 'dashboard-pane') {
|
if ($type === 'dashboard-pane') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user