mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
parent
8510d57cf8
commit
a1a8d4c157
@ -30,8 +30,11 @@ namespace Icinga\Application;
|
|||||||
|
|
||||||
// @codingStandardsIgnoreStart
|
// @codingStandardsIgnoreStart
|
||||||
require_once dirname(__FILE__). '/ApplicationBootstrap.php';
|
require_once dirname(__FILE__). '/ApplicationBootstrap.php';
|
||||||
|
require_once dirname(__FILE__). '/../Exception/ProgrammingError.php';
|
||||||
// @codingStandardsIgnoreStop
|
// @codingStandardsIgnoreStop
|
||||||
|
|
||||||
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bootstrapping on cli environment
|
* Bootstrapping on cli environment
|
||||||
*/
|
*/
|
||||||
@ -59,6 +62,6 @@ class Cli extends ApplicationBootstrap
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \Exception('Icinga is not running on CLI');
|
throw new ProgrammingError('Icinga is not running on CLI');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ class Module
|
|||||||
private $app;
|
private $app;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new module object
|
* Create a new module object
|
||||||
*
|
*
|
||||||
* @param ApplicationBootstrap $app
|
* @param ApplicationBootstrap $app
|
||||||
* @param string $name
|
* @param string $name
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
namespace Icinga\Application;
|
namespace Icinga\Application;
|
||||||
|
|
||||||
use Icinga\Authentication\Manager as AuthenticationManager;
|
use Icinga\Authentication\Manager as AuthenticationManager;
|
||||||
use Icinga\Exception\ProgrammingError;
|
|
||||||
use Icinga\User\Preferences;
|
use Icinga\User\Preferences;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
use Zend_Controller_Front;
|
use Zend_Controller_Front;
|
||||||
@ -200,7 +199,7 @@ class Web extends ApplicationBootstrap
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects dependencies into request
|
* Inject dependencies into request
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Authentication\Backend;
|
namespace Icinga\Authentication\Backend;
|
||||||
|
|
||||||
use Icinga\Authentication\User as User;
|
use Icinga\User;
|
||||||
use Icinga\Authentication\UserBackend;
|
use Icinga\Authentication\UserBackend;
|
||||||
use Icinga\Authentication\Credentials;
|
use Icinga\Authentication\Credentials;
|
||||||
use Icinga\Authentication;
|
use Icinga\Authentication;
|
||||||
|
@ -149,7 +149,7 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all groups this user belongs to
|
* Return all groups this user belongs to
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@ -159,7 +159,7 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the groups this user belongs to
|
* Set the groups this user belongs to
|
||||||
*/
|
*/
|
||||||
public function setGroups(array $groups)
|
public function setGroups(array $groups)
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the user is a member of this group
|
* Return true if the user is a member of this group
|
||||||
*
|
*
|
||||||
* @param string $group
|
* @param string $group
|
||||||
* @return boolean
|
* @return boolean
|
||||||
@ -178,7 +178,7 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns permission information for this user
|
* Return permission information for this user
|
||||||
*
|
*
|
||||||
* @return Array
|
* @return Array
|
||||||
*/
|
*/
|
||||||
@ -293,7 +293,7 @@ class User
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets additional information about user
|
* Set additional information about user
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
@ -57,15 +57,10 @@ class Request extends Zend_Controller_Request_Http
|
|||||||
/**
|
/**
|
||||||
* Getter for user
|
* Getter for user
|
||||||
*
|
*
|
||||||
* @throws ProgrammingError
|
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public function getUser()
|
public function getUser()
|
||||||
{
|
{
|
||||||
if (!$this->user instanceof User) {
|
|
||||||
throw new ProgrammingError('User not previously initialized');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->user;
|
return $this->user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
namespace Monitoring\Command;
|
namespace Monitoring\Command;
|
||||||
|
|
||||||
use Icinga\Authentication\User;
|
use Icinga\User;
|
||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,12 +39,12 @@ require_once('../../library/Icinga/Protocol/Ldap/Exception.php');
|
|||||||
require_once('../../library/Icinga/Application/Config.php');
|
require_once('../../library/Icinga/Application/Config.php');
|
||||||
require_once('../../library/Icinga/Authentication/Credentials.php');
|
require_once('../../library/Icinga/Authentication/Credentials.php');
|
||||||
require_once('../../library/Icinga/Authentication/Backend/DbUserBackend.php');
|
require_once('../../library/Icinga/Authentication/Backend/DbUserBackend.php');
|
||||||
require_once('../../library/Icinga/Authentication/User.php');
|
require_once('../../library/Icinga/User.php');
|
||||||
|
|
||||||
use Icinga\Authentication\Backend\DbUserBackend;
|
use Icinga\Authentication\Backend\DbUserBackend;
|
||||||
use Icinga\Util\Crypto;
|
use Icinga\Util\Crypto;
|
||||||
use Icinga\Authentication\Credentials;
|
use Icinga\Authentication\Credentials;
|
||||||
use Icinga\Authentication\User;
|
use Icinga\User;
|
||||||
use Icinga\Application\Config;
|
use Icinga\Application\Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user