Allow to overwrite the message which we already do in SubadminMiddleware

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-12-08 16:23:49 +01:00
parent 402a07bfe0
commit 61e15988a0
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ use OCP\AppFramework\Http;
* @package OC\AppFramework\Middleware\Security\Exceptions
*/
class NotAdminException extends SecurityException {
public function __construct() {
parent::__construct('Logged in user must be an admin', Http::STATUS_FORBIDDEN);
public function __construct($message = 'Logged in user must be an admin') {
parent::__construct($message, Http::STATUS_FORBIDDEN);
}
}