Allow to overwrite the message which we already do in SubadminMiddleware
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
402a07bfe0
commit
61e15988a0
|
@ -34,7 +34,7 @@ use OCP\AppFramework\Http;
|
||||||
* @package OC\AppFramework\Middleware\Security\Exceptions
|
* @package OC\AppFramework\Middleware\Security\Exceptions
|
||||||
*/
|
*/
|
||||||
class NotAdminException extends SecurityException {
|
class NotAdminException extends SecurityException {
|
||||||
public function __construct() {
|
public function __construct($message = 'Logged in user must be an admin') {
|
||||||
parent::__construct('Logged in user must be an admin', Http::STATUS_FORBIDDEN);
|
parent::__construct($message, Http::STATUS_FORBIDDEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue