fix permissions
This commit is contained in:
parent
bd8af37149
commit
56eec0f2e7
3 changed files with 5 additions and 3 deletions
|
@ -19,7 +19,7 @@ dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||||
dcCore::app()->adminurl->get('admin.plugin.alias'),
|
dcCore::app()->adminurl->get('admin.plugin.alias'),
|
||||||
dcPage::getPF('alias/icon.png'),
|
dcPage::getPF('alias/icon.png'),
|
||||||
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.alias')) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.alias')) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||||
dcCore::app()->auth->check(dcAuth::PERMISSION_ADMIN, dcCore::app()->blog->id)
|
dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]), dcCore::app()->blog->id)
|
||||||
);
|
);
|
||||||
|
|
||||||
dcCore::app()->addBehavior('exportFullV2', function ($exp) {
|
dcCore::app()->addBehavior('exportFullV2', function ($exp) {
|
||||||
|
|
|
@ -21,7 +21,9 @@ $this->registerModule(
|
||||||
'1.3',
|
'1.3',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.24']],
|
'requires' => [['core', '2.24']],
|
||||||
'permissions' => dcAuth::PERMISSION_ADMIN,
|
'permissions' => dcCore::app()->auth->makePermissions([
|
||||||
|
dcAuth::PERMISSION_ADMIN,
|
||||||
|
]),
|
||||||
'type' => 'plugin',
|
'type' => 'plugin',
|
||||||
'support' => 'https://github.com/JcDenis/alias',
|
'support' => 'https://github.com/JcDenis/alias',
|
||||||
'details' => 'https://plugins.dotaddict.org/dc2/details/alias',
|
'details' => 'https://plugins.dotaddict.org/dc2/details/alias',
|
||||||
|
|
|
@ -14,7 +14,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
dcPage::check(dcAuth::PERMISSION_ADMIN);
|
dcPage::check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]));
|
||||||
|
|
||||||
$o = new dcAliases();
|
$o = new dcAliases();
|
||||||
$aliases = $o->getAliases();
|
$aliases = $o->getAliases();
|
||||||
|
|
Loading…
Reference in a new issue