fix permissions

This commit is contained in:
Jean-Christian Denis 2022-12-01 00:40:16 +01:00
parent c0868e6532
commit b546df90eb
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
3 changed files with 7 additions and 3 deletions

View file

@ -34,7 +34,7 @@ dcCore::app()->addBehavior('adminDashboardFavoritesV2', function (dcFavorites $f
'url' => dcCore::app()->adminurl->get('admin.plugin.enhancePostContent'), 'url' => dcCore::app()->adminurl->get('admin.plugin.enhancePostContent'),
'small-icon' => urldecode(dcPage::getPF('enhancePostContent/icon.svg')), 'small-icon' => urldecode(dcPage::getPF('enhancePostContent/icon.svg')),
'large-icon' => urldecode(dcPage::getPF('enhancePostContent/icon.svg')), 'large-icon' => urldecode(dcPage::getPF('enhancePostContent/icon.svg')),
'permissions' => dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), dcCore::app()->blog->id), 'permissions' => dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]),
]); ]);
}); });

View file

@ -21,7 +21,9 @@ $this->registerModule(
'2022.11.20', '2022.11.20',
[ [
'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/enhancePostContent', 'support' => 'https://github.com/JcDenis/enhancePostContent',
'details' => 'https://plugins.dotaddict.org/dc2/details/enhancePostContent', 'details' => 'https://plugins.dotaddict.org/dc2/details/enhancePostContent',

View file

@ -14,7 +14,9 @@ if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;
} }
dcPage::check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN])); dcPage::check(dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_CONTENT_ADMIN,
]));
# -- Prepare queries and object -- # -- Prepare queries and object --