Permissions to constants

This commit is contained in:
Matthew Barbour
2019-07-09 09:10:21 -05:00
committed by matthew
parent d16dfe24f2
commit cb1e9c0075
57 changed files with 323 additions and 257 deletions

View File

@@ -293,7 +293,7 @@ class Setup extends Extension
}
if ($event->page_matches("setup")) {
if (!$user->can("change_setting")) {
if (!$user->can(Permissions::CHANGE_SETTING)) {
$this->theme->display_permission_denied();
} else {
if ($event->get_arg(0) == "save" && $user->check_auth_token()) {
@@ -413,7 +413,7 @@ class Setup extends Extension
public function onUserBlockBuilding(UserBlockBuildingEvent $event)
{
global $user;
if ($user->can("change_setting")) {
if ($user->can(Permissions::CHANGE_SETTING)) {
$event->add_link("Board Config", make_link("setup"));
}
}