From 61e15988a0b37626e509543eec22e2452c3daad0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 8 Dec 2016 16:23:49 +0100 Subject: Allow to overwrite the message which we already do in SubadminMiddleware Signed-off-by: Joas Schilling --- .../AppFramework/Middleware/Security/Exceptions/NotAdminException.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php index 0c7da432afe..94191f7f5b5 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php @@ -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); } } -- cgit v1.2.3