Skip to content

Commit

Permalink
EZP-29742: Implement permissions for Content/Create in Content item v…
Browse files Browse the repository at this point in the history
…iew - content create policy in UDW
  • Loading branch information
mikadamczyk committed Nov 20, 2018
1 parent afe3a5f commit b169ec9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/lib/Menu/LeftSidebarBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public function createStructure(array $options): ItemInterface
'extras' => ['icon' => 'browse'],
'attributes' => [
'class' => 'btn--udw-browse',
'data-udw-config' => $this->udwExtension->renderUniversalDiscoveryWidgetConfig('single'),
'data-udw-config' => $this->udwExtension->renderUniversalDiscoveryWidgetConfig('single', [
'type' => 'content_create',
]),
'data-starting-location-id' => $this->configResolver->getParameter(
'universal_discovery_widget_module.default_location_id'
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function getSubscribedEvents(): array
public function onUdwConfigResolve(ConfigResolveEvent $event): void
{
$configName = $event->getConfigName();
if ('create' !== $configName) {
if ('create' !== $configName && 'single' !== $configName) {
return;
}

Expand Down

0 comments on commit b169ec9

Please sign in to comment.