Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ACL for Klaviyo config settings #264

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions etc/acl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="Klaviyo_Reclaim::config" title="Klaviyo">
<resource id="Klaviyo_Reclaim::klaviyo_reclaim_general" title="Klaviyo General" translate="title" sortOrder="150" />
<resource id="Klaviyo_Reclaim::klaviyo_reclaim_newsletter" title="Klaviyo Newsletter" translate="title" sortOrder="160" />
<resource id="Klaviyo_Reclaim::klaviyo_reclaim_consent_at_checkout" title="Klaviyo Consent at checkout" translate="title" sortOrder="170" />
<resource id="Klaviyo_Reclaim::klaviyo_reclaim_oauth" title="Klaviyo Oauth" translate="title" sortOrder="180" />
<resource id="Klaviyo_Reclaim::klaviyo_reclaim_webhook" title="Klaviyo Webhook" translate="title" sortOrder="190" />
</resource>
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>
13 changes: 4 additions & 9 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<tab id="klaviyo" translate="label" sortOrder="10">
<label>Klaviyo</label>
</tab>

<section id="klaviyo_reclaim_general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>General</label>
<tab>klaviyo</tab>
Expand Down Expand Up @@ -33,11 +32,10 @@
</field>
</group>
</section>

<section id="klaviyo_reclaim_newsletter" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Newsletter</label>
<tab>klaviyo</tab>
<resource>Klaviyo_Reclaim::klaviyo_reclaim</resource>
<resource>Klaviyo_Reclaim::klaviyo_reclaim_newsletter</resource>
<group id="newsletter" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Newsletter</label>
<field id="newsletter" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
Expand All @@ -53,11 +51,10 @@
</field>
</group>
</section>

<section id="klaviyo_reclaim_consent_at_checkout" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Consent at Checkout</label>
<tab>klaviyo</tab>
<resource>Klaviyo_Reclaim::klaviyo_reclaim</resource>
<resource>Klaviyo_Reclaim::klaviyo_reclaim_consent_at_checkout</resource>
<group id="email_consent" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Email</label>
<field id="is_active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
Expand Down Expand Up @@ -129,11 +126,10 @@
</field>
</group>
</section>

<section id="klaviyo_reclaim_oauth" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Setup OAuth</label>
<tab>klaviyo</tab>
<resource>Klaviyo_Reclaim::klaviyo_reclaim</resource>
<resource>Klaviyo_Reclaim::klaviyo_reclaim_oauth</resource>
<group id="klaviyo_oauth" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Setup Oauth</label>
<field id="integration_name" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
Expand All @@ -142,11 +138,10 @@
</field>
</group>
</section>

<section id="klaviyo_reclaim_webhook" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Webhooks</label>
<tab>klaviyo</tab>
<resource>Klaviyo_Reclaim::klaviyo_reclaim</resource>
<resource>Klaviyo_Reclaim::klaviyo_reclaim_webhook</resource>
<group id="klaviyo_webhooks" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Setup Klaviyo Webhooks</label>
<field id="webhook_secret" translate="label" type="password" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
Expand Down