Skip to content

Commit

Permalink
update protected pages
Browse files Browse the repository at this point in the history
  • Loading branch information
auxonic committed Mar 1, 2023
1 parent 350f338 commit b5cc3b9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,15 @@ public function sendAccessDenied($pid) {
public function protectedPagesIsPageLocked(string $current_path, string $normal_path) {
$pid = NULL;

if (in_array($current_path, ['/protected-page', '/user'])) {
// Pages never to protect
return;
}

// Check all protected pages entries for path match including wildcards.
$all_protected_pages = $this->protectedPagesStorage->loadAllProtectedPages();
foreach ($all_protected_pages as $protected_page) {
if ($this->pathMatcher->matchPath($current_path, $protected_page->path) && $current_path != '/protected-page' && $current_path != '/user') {
if ($this->pathMatcher->matchPath($current_path, $protected_page->path)) {
$pid = $protected_page->pid;
break;
}
Expand Down

0 comments on commit b5cc3b9

Please sign in to comment.