Skip to content

Commit

Permalink
fix: update permissions for institutional managers
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelWagstaff committed Dec 18, 2024
1 parent 021e8ee commit 05bf432
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Services/PermissionsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ private function currentUserHasAccess(string $currentPageParam, array $allowedBo
}
}

// Prevent institutional managers from editing pages on the root site
if ($currentBlogId === 1 && ($pagenow === 'edit.php' || $pagenow === 'post.php')) {
$isAccessAllowed = false;
}

return $isAccessAllowed;
}
}
3 changes: 2 additions & 1 deletion src/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ function get_allowed_pages(): array
'users.php',
'export-personal-data.php',
'erase-personal-data.php',
'options-privacy.php'
'options-privacy.php',
'site-new.php'
];
}

Expand Down

0 comments on commit 05bf432

Please sign in to comment.