diff --git a/composer.json b/composer.json index 28217fb..bb252b2 100644 --- a/composer.json +++ b/composer.json @@ -5,11 +5,13 @@ "license": "proprietary", "require": { "php": ">=8.0", + "spryker/acl-merchant-portal-extension": "^1.0.0", "spryker/application-extension": "^1.0.0", "spryker/event-dispatcher-extension": "^1.0.0", "spryker/kernel": "^3.52.0", "spryker/locale-extension": "^1.0.0", - "spryker/propel-orm": "^1.8.0" + "spryker/propel-orm": "^1.8.0", + "spryker/transfer": "^3.25.0" }, "require-dev": { "spryker/code-sniffer": "*", diff --git a/dependency.json b/dependency.json new file mode 100644 index 0000000..22c114f --- /dev/null +++ b/dependency.json @@ -0,0 +1,5 @@ +{ + "include": { + "spryker/transfer": "Provides transfer objects definition with `::get*OrFail()` functionality." + } +} diff --git a/src/Spryker/Shared/Locale/Transfer/locale.transfer.xml b/src/Spryker/Shared/Locale/Transfer/locale.transfer.xml index ed1cf0a..823fbbe 100644 --- a/src/Spryker/Shared/Locale/Transfer/locale.transfer.xml +++ b/src/Spryker/Shared/Locale/Transfer/locale.transfer.xml @@ -5,4 +5,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/Spryker/Zed/Locale/Communication/Plugin/AclMerchantPortal/LocaleAclEntityConfigurationExpanderPlugin.php b/src/Spryker/Zed/Locale/Communication/Plugin/AclMerchantPortal/LocaleAclEntityConfigurationExpanderPlugin.php new file mode 100644 index 0000000..9608583 --- /dev/null +++ b/src/Spryker/Zed/Locale/Communication/Plugin/AclMerchantPortal/LocaleAclEntityConfigurationExpanderPlugin.php @@ -0,0 +1,53 @@ +getAclEntityMetadataCollectionOrFail() + ->addAclEntityMetadata( + 'Orm\Zed\Locale\Persistence\SpyLocale', + (new AclEntityMetadataTransfer()) + ->setEntityName('Orm\Zed\Locale\Persistence\SpyLocale') + ->setDefaultGlobalOperationMask(static::OPERATION_MASK_READ), + ); + + return $aclEntityMetadataConfigTransfer; + } +} diff --git a/src/Spryker/Zed/Locale/Communication/Plugin/AclMerchantPortal/LocaleMerchantAclEntityRuleExpanderPlugin.php b/src/Spryker/Zed/Locale/Communication/Plugin/AclMerchantPortal/LocaleMerchantAclEntityRuleExpanderPlugin.php new file mode 100644 index 0000000..41bc562 --- /dev/null +++ b/src/Spryker/Zed/Locale/Communication/Plugin/AclMerchantPortal/LocaleMerchantAclEntityRuleExpanderPlugin.php @@ -0,0 +1,55 @@ + $aclEntityRuleTransfers + * + * @return list<\Generated\Shared\Transfer\AclEntityRuleTransfer> + */ + public function expand(array $aclEntityRuleTransfers): array + { + $aclEntityRuleTransfers[] = (new AclEntityRuleTransfer()) + ->setEntity('Orm\Zed\Locale\Persistence\SpyLocale') + ->setScope(static::SCOPE_GLOBAL) + ->setPermissionMask(static::OPERATION_MASK_READ); + + return $aclEntityRuleTransfers; + } +}