Help needed- NopCommerce defect logged me out of admin panel

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
Hi there

No one is responding on the Bug Report Forum so I am reposting here with the hope that someone will help.
Here is mypost:

I have a HUGE problem.  I was logged into NopCommerce as administrator and wanted to add a customer role and assign an ACL to it.  I checked the Nop_Commerce 1.5 user guide and followed the instructions - 1 I created a new customer role (ProductManagement), 2 - I go to the ACL list and assign Manage Catalogue to the new role.

Now I AM ASSIGNED the new role!!!   I never assigned this customer role to me (my customerID) but somehow NopCommerce associated this role with me and I can't go anywhere in the admin console except for the Manage Catalogue section.  I can't see my orders, I can't change anything back.

I need help from the NOP Commerce team asap.  I have an online store and your software just locked me out of my own store....  Someone, please tell me how to fix this.


Please - if anyone has some guidance on how I can get this fixed.  I have a production system, orders I need to process, customers calling in and I can't get into my admin panel. This is a serious defect.  Doe anyone have a SQL that I can run to get my permission re-installed? PLEASE HELP
13 年 前
OK an update on this

I got someone to help me navigate the database - this new role is not assigned to any customer (no mapping to this new role in the Nop_Customer_CustomerRole_Mapping table BUT when an ADMIN is logged into NopCommerce the admin panel behaves as if this role is associated with the ADMIN user.

The role is setup to manage catalogue but if you go into the manage catalogue page in the admin panel it ONLY ALLOWS YOU TO SEE OPTIONS (https://www.mywebsite.com/administration/cataloghome.aspx)  If I click on any of the options to add products etc I see a warning telling me I have no priviledges to see it.

I am still troubleshooting to see why ADMIN doesn't work anymore - any suggestions will be appreciated.
13 年 前
OK some other things I tried - I updated the SQL DB to set the new role to inactive, logged out, clear cache, logged in, clear cache (button in admin screen) I still can't go anywhere - I only get redirected to the accessdenied.aspx : You do not have permission to perform the selected operation.
13 年 前
I'm going to take a wild stab in the dark and suggest that you are not a member of the "Global Administrators" role.

Before ACLs were implemented in nopCommerce, we determined whether a user was an administrator by the IsAdmin property on customer.

This still works today, for logging into administration. However, if you turn on ACL support and haven't added yourself to the "Global Administrators" role, you will find that you are not able to do very much.

So the solution, add yourself to the Global Administrators role. You can do this directly in the role mappings table - I believe the Global Administrators role has an ID of 1.

So this is not a bug, but it could perhaps be better documented.

HTH
13 年 前
Thanks RetroViz! you hit the nail on the head.  I created and admin role  (there was no Global Admin Role defined and I had to do it with SQL queries since I couldn't do anything via the ADMIN panel) and then I allowed everything on the ADMIN role and assigned the role to myself (all via SQL) and now it is working!

Thanks so much.  Yes - it has to be better documented and users should be warned that they have to have the admin role created and  associated with an ACL before enabling ACL.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.