aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Middleware/SubadminMiddleware.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/lib/Middleware/SubadminMiddleware.php')
-rw-r--r--apps/settings/lib/Middleware/SubadminMiddleware.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/settings/lib/Middleware/SubadminMiddleware.php b/apps/settings/lib/Middleware/SubadminMiddleware.php
index ffc507e50e0..7fa30c8e26c 100644
--- a/apps/settings/lib/Middleware/SubadminMiddleware.php
+++ b/apps/settings/lib/Middleware/SubadminMiddleware.php
@@ -65,8 +65,8 @@ class SubadminMiddleware extends Middleware {
* @throws \Exception
*/
public function beforeController($controller, $methodName) {
- if(!$this->reflector->hasAnnotation('NoSubadminRequired')) {
- if(!$this->isSubAdmin) {
+ if (!$this->reflector->hasAnnotation('NoSubadminRequired')) {
+ if (!$this->isSubAdmin) {
throw new NotAdminException($this->l10n->t('Logged in user must be a subadmin'));
}
}
@@ -81,7 +81,7 @@ class SubadminMiddleware extends Middleware {
* @throws \Exception
*/
public function afterException($controller, $methodName, \Exception $exception) {
- if($exception instanceof NotAdminException) {
+ if ($exception instanceof NotAdminException) {
$response = new TemplateResponse('core', '403', [], 'guest');
$response->setStatus(Http::STATUS_FORBIDDEN);
return $response;
@@ -89,5 +89,4 @@ class SubadminMiddleware extends Middleware {
throw $exception;
}
-
}