Permissions to constants
This commit is contained in:
@ -118,7 +118,7 @@ class ExtManager extends Extension
|
||||
{
|
||||
global $page, $user;
|
||||
if ($event->page_matches("ext_manager")) {
|
||||
if ($user->can("manage_extension_list")) {
|
||||
if ($user->can(Permissions::MANAGE_EXTENSION_LIST)) {
|
||||
if ($event->get_arg(0) == "set" && $user->check_auth_token()) {
|
||||
if (is_writable("data/config")) {
|
||||
$this->set_things($_POST);
|
||||
@ -166,7 +166,7 @@ class ExtManager extends Extension
|
||||
public function onUserBlockBuilding(UserBlockBuildingEvent $event)
|
||||
{
|
||||
global $user;
|
||||
if ($user->can("manage_extension_list")) {
|
||||
if ($user->can(Permissions::MANAGE_EXTENSION_LIST)) {
|
||||
$event->add_link("Extension Manager", make_link("ext_manager"));
|
||||
} else {
|
||||
$event->add_link("Help", make_link("ext_doc"));
|
||||
|
Reference in New Issue
Block a user