3

I have created a user . I give a user role and give resources to add recipies . it is working for admin user . but it is not working for non admins . screenshots will help you understand my question. enter image description here

and for non admin users . enter image description here

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2018 Mageside. All rights reserved.
 * See MS-LICENSE.txt for license details.
 */
-->
<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::content">
                    <resource id="Mageside_Recipe::mageside_recipe_manage" title="Mageside Recipes Manage"/>
                </resource>
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Mageside_Recipe::config_mageside_recipe" title="Mageside Recipes Config" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

menu.xml is

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<!--
/**
 * Copyright © 2018 Mageside. All rights reserved.
 * See MS-LICENSE.txt for license details.
 */
-->
    <menu>
        <add id="Mageside_Recipe::recipe"
             title="Recipes"
             translate="title"
             module="Mageside_Recipe"
             sortOrder="50"
             parent="Magento_Backend::content"
             dependsOnModule="Mageside_Recipe"
             resource="Mageside_Recipe::mageside_recipe_manage"/>
        <add id="Mageside_Recipe::recipe_menu"
             title="Manage Recipes"
             translate="title"
             module="Mageside_Recipe"
             sortOrder="55"
             resource="Mageside_Recipe::mageside_recipe_manage"
             parent="Mageside_Recipe::recipe"
             action="recipe/recipe/manage"/>
        <add id="Mageside_Recipe::recipe_menu_filter"
             title="Recipe Filters"
             translate="title"
             module="Mageside_Recipe"
             sortOrder="60"
             resource="Mageside_Recipe::mageside_recipe_manage"
             parent="Mageside_Recipe::recipe"
             action="recipe/recipe/filter"/>
        <add id="Mageside_Recipe::recipe_menu_reviews"
             title="Recipe Reviews"
             translate="title"
             module="Mageside_Recipe"
             sortOrder="70"
             resource="Mageside_Recipe::mageside_recipe_manage"
             parent="Mageside_Recipe::recipe"
             action="recipe/reviews/manage"/>
    </menu>
</config>
  • share your acl.xml – PROGOSTECH Sep 25 '18 at 15:18
  • share you menu.xml too. – PROGOSTECH Sep 25 '18 at 15:40
1

Here is two thing you have to check..

your controller have

const ADMIN_RESOURCE = 'Mageside_Recipe::mageside_recipe_manage';

and your Vendor/modulename/etc/adminhtml/menu.xml have same resource id too

resource="Mageside_Recipe::mageside_recipe_manage"
  • yes they are same . – samair ali Sep 25 '18 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.