Skip to content

Commit

Permalink
[permissions] bugfixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-moser committed Oct 20, 2017
1 parent 3f4d39b commit c501b44
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Admin/ActivitiesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ActivitiesController extends \Pimcore\Bundle\AdminBundle\Controller\AdminC
{
public function onKernelController(FilterControllerEvent $event)
{
$this->checkPermission('plugin_cmf_activityview');
$this->checkPermission('plugin_cmf_perm_activityview');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/CustomersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CustomersController extends Admin
public function onKernelController(FilterControllerEvent $event)
{
parent::onKernelController($event);
$this->checkPermission('plugin_cmf_customerview');
$this->checkPermission('plugin_cmf_perm_customerview');

\Pimcore\Model\DataObject\AbstractObject::setHideUnpublished(true);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/js/ActivityView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var ActivityView = pimcore.registerNS("pimcore.plugin.customermanagementframework.ActivityView");

ActivityView.config = {
PERMISSION: "plugin_cmf_activityview"
PERMISSION: "plugin_cmf_perm_activityview"
};

ActivityView.ActivityTab = Class.create({
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/public/js/CustomerView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var CustomerView = pimcore.registerNS("pimcore.plugin.customermanagementframework.CustomerView");

CustomerView.config = {
PERMISSION: "plugin_cmf_customerview"
PERMISSION: "plugin_cmf_perm_customerview"
};

CustomerView.CustomerTab = Class.create({
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/public/js/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pimcore.plugin.customermanagementframework = Class.create(pimcore.plugin.admin,
}

// customer view
if (user.isAllowed('plugin_cmf_customerview')) {
if (user.isAllowed('plugin_cmf_perm_customerview')) {
var customerViewPanelId = 'plugin_cmf_customerview';
var item = {
text: t('plugin_cmf_customerview'),
Expand Down Expand Up @@ -56,7 +56,7 @@ pimcore.plugin.customermanagementframework = Class.create(pimcore.plugin.admin,
}

// customer duplicates view
if (pimcore.settings.cmf.duplicatesViewEnabled && user.isAllowed('plugin_cmf_customerview')) {
if (pimcore.settings.cmf.duplicatesViewEnabled && user.isAllowed('plugin_cmf_perm_customerview')) {
var customerDuplicateViewPanelId = 'plugin_cmf_customerduplicatesview';
var item = {
text: t('plugin_cmf_customerduplicatesview'),
Expand All @@ -83,7 +83,7 @@ pimcore.plugin.customermanagementframework = Class.create(pimcore.plugin.admin,
menuItems.add(item);
}

if (user.isAllowed('plugin_cmf_customer_automation_rules')) {
if (user.isAllowed('plugin_cmf_perm_customer_automation_rules')) {
var customerAutomationRulesPanelId = 'plugin_cmf_customerautomationrules';
var item = {
text: t('plugin_cmf_customerautomationrules'),
Expand All @@ -101,7 +101,7 @@ pimcore.plugin.customermanagementframework = Class.create(pimcore.plugin.admin,
menuItems.add(item);
}

if (pimcore.settings.cmf.newsletterSyncEnabled && user.isAllowed('plugin_cmf_newsletter_enqueue_all_customers')) {
if (pimcore.settings.cmf.newsletterSyncEnabled && user.isAllowed('plugin_cmf_perm_newsletter_enqueue_all_customers')) {
var item = {
text: t('plugin_cmf_newsletter_enqueue_all_customers'),
iconCls: 'pimcore_icon_newsletter_enqueue_all_customers',
Expand Down

0 comments on commit c501b44

Please sign in to comment.