Skip to content

Commit

Permalink
Fix admin.protectmetadata - The metadata endpoints would show a blank…
Browse files Browse the repository at this point in the history
… page instead of an admin-login page
  • Loading branch information
tvdijen committed Aug 11, 2023
1 parent 8b2e3e9 commit bede862
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Controller/Adfs.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public function metadata(Request $request): Response
}

// check if valid local session exists
if ($this->config->getOptionalBoolean('admin.protectmetadata', false)) {
$authUtils = new Utils\Auth();
$authUtils->requireAdmin();
$authUtils = new Utils\Auth();
if ($this->config->getOptionalBoolean('admin.protectmetadata', false) && !$authUtils->isAdmin()) {
return new RunnableResponse([$authUtils, 'requireAdmin']);
}

try {
Expand Down

0 comments on commit bede862

Please sign in to comment.