forked from Cavemanon/cavepaintings
Permissions to constants
This commit is contained in:
@@ -29,7 +29,7 @@ class Blocks extends Extension
|
||||
public function onUserBlockBuilding(UserBlockBuildingEvent $event)
|
||||
{
|
||||
global $user;
|
||||
if ($user->can("manage_blocks")) {
|
||||
if ($user->can(Permissions::MANAGE_BLOCKS)) {
|
||||
$event->add_link("Blocks Editor", make_link("blocks/list"));
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class Blocks extends Extension
|
||||
}
|
||||
}
|
||||
|
||||
if ($event->page_matches("blocks") && $user->can("manage_blocks")) {
|
||||
if ($event->page_matches("blocks") && $user->can(Permissions::MANAGE_BLOCKS)) {
|
||||
if ($event->get_arg(0) == "add") {
|
||||
if ($user->check_auth_token()) {
|
||||
$database->execute("
|
||||
|
Reference in New Issue
Block a user