fix permissions
parent
06d3ffaa13
commit
00fe904b35
|
@ -23,7 +23,7 @@ if (dcCore::app()->blog->settings->postwidgettext->postwidgettext_active) {
|
|||
dcCore::app()->adminurl->get('admin.plugin.postWidgetText'),
|
||||
dcPage::getPF('postWidgetText/icon.svg'),
|
||||
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.postWidgetText')) . '(&.*)?$/', $_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)
|
||||
);
|
||||
|
||||
dcCore::app()->addBehavior('adminDashboardFavoritesV2', ['adminPostWidgetText', 'adminDashboardFavorites']);
|
||||
|
|
|
@ -153,7 +153,7 @@ class postWidgetText
|
|||
|
||||
$cur->option_upddt = date('Y-m-d H:i:s');
|
||||
|
||||
if (!dcCore::app()->auth->check(dcAuth::PERMISSION_CONTENT_ADMIN, $this->blog)) {
|
||||
if (!dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), $this->blog)) {
|
||||
$params['option_id'] = $id;
|
||||
$params['user_id'] = $this->con->escape(dcCore::app()->auth->userID());
|
||||
$params['no_content'] = true;
|
||||
|
@ -185,7 +185,7 @@ class postWidgetText
|
|||
throw new Exception(__('No such ID'));
|
||||
}
|
||||
|
||||
if (!dcCore::app()->auth->check(dcAuth::PERMISSION_CONTENT_ADMIN, $this->blog)) {
|
||||
if (!dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_CONTENT_ADMIN]), $this->blog)) {
|
||||
$params['option_id'] = $id;
|
||||
$params['user_id'] = $this->con->escape(dcCore::app()->auth->userID());
|
||||
$params['no_content'] = true;
|
||||
|
|
|
@ -72,10 +72,10 @@ class adminPostWidgetText
|
|||
'url' => dcCore::app()->adminurl->get('admin.plugin.postWidgetText'),
|
||||
'small-icon' => dcPage::getPF('postWidgetText/icon.svg'),
|
||||
'large-icon' => dcPage::getPF('postWidgetText/icon.svg'),
|
||||
'permissions' => dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
|
||||
'permissions' => dcCore::app()->auth->makePermissions([
|
||||
dcAuth::PERMISSION_USAGE,
|
||||
dcAuth::PERMISSION_CONTENT_ADMIN,
|
||||
]), dcCore::app()->blog->id),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue