Removed permissions stuff from the User object.

This commit is contained in:
flash 2023-07-29 18:15:30 +00:00
parent 05d1beb267
commit 9449af30ef
7 changed files with 45 additions and 52 deletions
public

View file

@ -168,6 +168,11 @@ $hasManageAccess = User::hasCurrent()
&& perms_check_user(MSZ_PERMS_GENERAL, User::getCurrent()->getId(), MSZ_PERM_GENERAL_CAN_MANAGE);
Template::set('has_manage_access', $hasManageAccess);
$canViewForumLeaderboard = User::hasCurrent()
&& !$msz->hasActiveBan()
&& perms_check_user(MSZ_PERMS_GENERAL, User::getCurrent()->getId(), MSZ_PERM_FORUM_VIEW_LEADERBOARD);
Template::set('can_view_forum_leaderboard', $canViewForumLeaderboard);
if($inManageMode) {
if(!$hasManageAccess) {
echo render_error(403);