- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento. How to reset magento Admin user, role and resources permission to all
August 10, 2015
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
-
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
-
So, lets see how to fix the problem if all resource permissions were set to none for the admin role .
-
Login to your PhPmyAdmin panel to manage your database.
-
Backup your database.
-
Select your database and click on the SQL tab.
-
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
-
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
-
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')
-
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.
-
In some cases, Admin may be assigned to a wrong role
-
If that is the case, please follow the steps bellow.
-
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'
-
To load Role information:
SELECT * FROM admin_role WHERE role_type = 'G'
]> 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