Categories

Featured templates

Magento. How to reset magento Admin user, role and resources permission to all

Ray Taylor August 10, 2015
Rating: 5.0/5. From 1 vote.
Please wait...

In this tutorial you will learn to reset Magento Admin user, role and resources permission to all in Magento.

Magento. How to reset magento Admin user, role and resources permission to all

  1. In some cases, while managing User Role / Permissions, all resource permissions may be set to none for the admin role. If this happens, you won’t be able to login to admin panel and/or you will receive the following error

    magento_reset_admin_user_role_and_resources_permission_to_all_1

  2. So, lets see how to fix the problem if all resource permissions were set to none for the admin role .

  3. Login to your PhPmyAdmin panel to manage your database.

  4. Backup your database.

  5. Select your database and click on the SQL tab.

  6. Now we need to get current admin role details. Copy and paste the following query:

    SELECT * FROM admin_role WHERE role_name = 'Administrators' 

    where Administrators – is Your admin role name

    magento_reset_admin_user_role_and_resources_permission_to_all_2

  7. Next step is to remove existing permissions for the Admin role. Copy and paste the following query:

    DELETE admin_rule  
     FROM admin_rule, admin_role  
    WHERE   
     admin_role.role_name = 'Administrators' 
     AND admin_rule.role_id = admin_role.role_id 
    
  8. Lastly we need to update permission rule for the admin role. Copy and paste the following query:

    INSERT INTO admin_rule (role_id, resource_id, assert_id, role_type, permission)  
    VALUES ('1','all', '0', 'G', 'allow')
    
  9. Go back to your site admin, reload the page and try to login. You should be able to access your admin panel and manage your site.

  10. In some cases, Admin may be assigned to a wrong role

  11. If that is the case, please follow the steps bellow.

  12. To load your user information import the following query:

    SELECT ar.*, au.*  
    FROM admin_user AS au  
    INNER JOIN admin_role AS ar ON (au.user_id = ar.user_id)  
    WHERE au.username = 'username'  
    
  13. To load Role information:

    SELECT * FROM admin_role WHERE role_type = 'G' 
    
    ]>
  14. To update your user for the proper role:

    UPDATE admin_role SET parent_id = [put selected role_id here] WHERE user_id = [your USER id]  
    

    where [your USER id] is your actual User ID

Thank you for reading this video tutorial. Now you know how to reset magento Admin user, role and resources permission to all in Magento.

Feel free to check the detailed video tutorial below:

Magento. How to reset magento Admin user, role and resources permission to all

Magento Responsive Themes
This entry was posted in Magento Tutorials and tagged admin, Magento, permission, reset, role, user. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket