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'),
|
||||
dcCore::app()->adminurl->get('admin.plugin.noodles'),
|
||||
dcPage::getPF('noodles/icon.png'),
|
||||
preg_match('/noodles(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||
dcCore::app()->auth->check(dcAuth::PERMISSION_CONTENT_ADMIN, dcCore::app()->blog->id)
|
||||
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.noodles')) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||
dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), dcCore::app()->blog->id)
|
||||
);
|
||||
|
|
|
@ -17,7 +17,9 @@ $this->registerModule(
|
|||
'0.9',
|
||||
[
|
||||
'requires' => [['core', '2.24']],
|
||||
'permissions' => dcAuth::PERMISSION_CONTENT_ADMIN,
|
||||
'permissions' => dcCore::app()->auth->makePermissions([
|
||||
dcAuth::PERMISSION_CONTENT_ADMIN,
|
||||
]),
|
||||
'type' => 'plugin',
|
||||
'support' => 'https://github.com/JcDenis/noodles',
|
||||
'details' => 'http://plugins.dotaddict.org/dc2/details/noodles',
|
||||
|
|
|
@ -14,7 +14,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
|
|||
return null;
|
||||
}
|
||||
|
||||
dcPage::check(dcAuth::PERMISSION_CONTENT_ADMIN);
|
||||
dcPage::check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]));
|
||||
|
||||
include __DIR__ . '/inc/_default_noodles.php';
|
||||
|
||||
|
|
Loading…
Reference in a new issue