fix permissions
This commit is contained in:
parent
b893af072b
commit
9215a50a6d
3 changed files with 6 additions and 4 deletions
|
@ -18,6 +18,6 @@ dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||||
__('Noodles'),
|
__('Noodles'),
|
||||||
dcCore::app()->adminurl->get('admin.plugin.noodles'),
|
dcCore::app()->adminurl->get('admin.plugin.noodles'),
|
||||||
dcPage::getPF('noodles/icon.png'),
|
dcPage::getPF('noodles/icon.png'),
|
||||||
preg_match('/noodles(&.*)?$/', $_SERVER['REQUEST_URI']),
|
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.noodles')) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||||
dcCore::app()->auth->check(dcAuth::PERMISSION_CONTENT_ADMIN, dcCore::app()->blog->id)
|
dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), dcCore::app()->blog->id)
|
||||||
);
|
);
|
||||||
|
|
|
@ -17,7 +17,9 @@ $this->registerModule(
|
||||||
'0.9',
|
'0.9',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.24']],
|
'requires' => [['core', '2.24']],
|
||||||
'permissions' => dcAuth::PERMISSION_CONTENT_ADMIN,
|
'permissions' => dcCore::app()->auth->makePermissions([
|
||||||
|
dcAuth::PERMISSION_CONTENT_ADMIN,
|
||||||
|
]),
|
||||||
'type' => 'plugin',
|
'type' => 'plugin',
|
||||||
'support' => 'https://github.com/JcDenis/noodles',
|
'support' => 'https://github.com/JcDenis/noodles',
|
||||||
'details' => 'http://plugins.dotaddict.org/dc2/details/noodles',
|
'details' => 'http://plugins.dotaddict.org/dc2/details/noodles',
|
||||||
|
|
|
@ -14,7 +14,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
dcPage::check(dcAuth::PERMISSION_CONTENT_ADMIN);
|
dcPage::check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]));
|
||||||
|
|
||||||
include __DIR__ . '/inc/_default_noodles.php';
|
include __DIR__ . '/inc/_default_noodles.php';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue