mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
parent
8510d57cf8
commit
a1a8d4c157
@ -30,8 +30,11 @@ namespace Icinga\Application;
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
require_once dirname(__FILE__). '/ApplicationBootstrap.php';
|
||||
require_once dirname(__FILE__). '/../Exception/ProgrammingError.php';
|
||||
// @codingStandardsIgnoreStop
|
||||
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
|
||||
/**
|
||||
* Bootstrapping on cli environment
|
||||
*/
|
||||
@ -59,6 +62,6 @@ class Cli extends ApplicationBootstrap
|
||||
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;
|
||||
|
||||
/**
|
||||
* Creates a new module object
|
||||
* Create a new module object
|
||||
*
|
||||
* @param ApplicationBootstrap $app
|
||||
* @param string $name
|
||||
|
@ -29,7 +29,6 @@
|
||||
namespace Icinga\Application;
|
||||
|
||||
use Icinga\Authentication\Manager as AuthenticationManager;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\User\Preferences;
|
||||
use Icinga\Web\Request;
|
||||
use Zend_Controller_Front;
|
||||
@ -200,7 +199,7 @@ class Web extends ApplicationBootstrap
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects dependencies into request
|
||||
* Inject dependencies into request
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
namespace Icinga\Authentication\Backend;
|
||||
|
||||
use Icinga\Authentication\User as User;
|
||||
use Icinga\User;
|
||||
use Icinga\Authentication\UserBackend;
|
||||
use Icinga\Authentication\Credentials;
|
||||
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
|
||||
*/
|
||||
@ -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)
|
||||
{
|
||||
@ -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
|
||||
* @return boolean
|
||||
@ -178,7 +178,7 @@ class User
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns permission information for this user
|
||||
* Return permission information for this user
|
||||
*
|
||||
* @return Array
|
||||
*/
|
||||
@ -293,7 +293,7 @@ class User
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets additional information about user
|
||||
* Set additional information about user
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
|
@ -57,15 +57,10 @@ class Request extends Zend_Controller_Request_Http
|
||||
/**
|
||||
* Getter for user
|
||||
*
|
||||
* @throws ProgrammingError
|
||||
* @return User
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
if (!$this->user instanceof User) {
|
||||
throw new ProgrammingError('User not previously initialized');
|
||||
}
|
||||
|
||||
return $this->user;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace Monitoring\Command;
|
||||
|
||||
use Icinga\Authentication\User;
|
||||
use Icinga\User;
|
||||
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/Authentication/Credentials.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\Util\Crypto;
|
||||
use Icinga\Authentication\Credentials;
|
||||
use Icinga\Authentication\User;
|
||||
use Icinga\User;
|
||||
use Icinga\Application\Config;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user