Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

magento admin panel, how can i fix "Access denied"

when I log into my admin panel, I get up this message "Access denied"

How can I fix the problem? I can not access anything without logging in?

like image 801
Max Avatar asked Dec 26 '22 23:12

Max


2 Answers

When this problem occurs after adding a new user, the problem could be that no role for that user is selected.

If you can still login with another user, you can simply select a role for the new user and the problem will be solved.

To select a role, go to: System > Permissions > Users > [Select User] > User Role (tab).

like image 108
Gerard de Visser Avatar answered Jan 10 '23 15:01

Gerard de Visser


If you have lost access to you admin page only, then you can go into your database and change the password by following method

  1. Enter into your database and search for admin_user table
  2. In admin_user table click the edit button on the row who you feel is the admin.
  3. In the password field, select the function as MD5 form the drop-down in the function column.
  4. Now in the value field, type the password and hit Go.

This way you can reset the password and make sure you are entering the correct password an d username. (the above method I am suggesting assuming that you cannot even enter the admin page)

Another method I am suggesting assuming that your access is denied for some particular module.

  1. Enter in to your magento files and navigate to the file named system.xml
  2. See how many groups you are having in the system.xml file as following

`

   <system> 
   <children>
    <config>
    <children>
    <my_group_name>
    <title>My Group Name</title>
    </my_group_name>
    <second_group_name>
    <title>My Second Group Name</title>
    </second_group_name>
    </children>
    </config>
    </children>
    </system>

Here I am showing two groups

3.Navigate to the config.xml file and add both groups names as children in config.xml

<config>
    <modules>
       ...
       ..
       .
    </modules>
    <frontend>
        ...
        ..
        .
    </frontend>
    <admin>
        ...
        ..
        .
    </admin>
    <adminhtml>
        <menu>
            ...
            ..
            .
        </menu>
        <acl>
            <resources>
                <all>
                    <title>Allow Everything</title>
                </all>
                <admin>
                    <children>
                        <MyCompany_MyModule>
                            <title>My Module</title>
                            <sort_order>10</sort_order>
                        </MyCompany_MyModule>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <my_group_name>
                                            <title>My Group Name</title>
                                        </my_group_name>
                                        <second_group_name>
                                            <title>My Second Group Name</title>
                                        </second_group_name>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
        <layout>
            ...
            ..
            .
        </layout>
    </adminhtml>  
    <global>
        ...
        ..
        .
    </global>
</config>

Source http://blog.chapagain.com.np/magento-access-denied-in-admin-of-custom-module/

hope this is helpful

like image 20
Venkateshwaran Selvaraj Avatar answered Jan 10 '23 16:01

Venkateshwaran Selvaraj