summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-12-08 16:23:49 +0100
committerJoas Schilling <coding@schilljs.com>2016-12-08 16:23:49 +0100
commit61e15988a0b37626e509543eec22e2452c3daad0 (patch)
treed6c4e4fa54b85beb605de6e457959aa8c0cd5a95 /lib
parent402a07bfe078aaa47b22f4db8c31b5e9c594f037 (diff)
downloadnextcloud-server-61e15988a0b37626e509543eec22e2452c3daad0.tar.gz
nextcloud-server-61e15988a0b37626e509543eec22e2452c3daad0.zip
Allow to overwrite the message which we already do in SubadminMiddleware
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php4
1 files changed, 2 insertions, 2 deletions
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);
}
}