Skip to content

Commit 66c0e2b

Browse files
committed
Do not serve templates that has no Access Control enabled.
1 parent 39e492c commit 66c0e2b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Settings.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ public static function getLegalTemplates()
2020
\ProcessWire\wire('roles')->find("");
2121

2222
foreach ($templates as $template) {
23-
// we serve templates with access control disabled
24-
if (!$template->useRoles) continue;
25-
26-
// if enabled we serve only those that user has permission to view
23+
// We serve only those that user has permission to view
2724
if (!$user->hasTemplatePermission('page-view', $template)) {
2825
$templates->remove($template);
2926
}

0 commit comments

Comments
 (0)