Don't expose manage urls to people without manage access.
This commit is contained in:
parent
045b5d768e
commit
d2f3eab015
1 changed files with 5 additions and 0 deletions
|
@ -196,9 +196,14 @@ function url_variable(string $value, array $variables): string {
|
|||
}
|
||||
|
||||
function url_list(): array {
|
||||
global $hasManageAccess;
|
||||
|
||||
$collection = [];
|
||||
|
||||
foreach(MSZ_URLS as $name => $urlInfo) {
|
||||
if(empty($hasManageAccess) && starts_with($name, 'manage-'))
|
||||
continue;
|
||||
|
||||
$item = [
|
||||
'name' => $name,
|
||||
'path' => $urlInfo[0],
|
||||
|
|
Loading…
Add table
Reference in a new issue