a.m. wrote:Another idea
...
...
...
Thanks for suggestion. But it also seems to be a bit complex. Maybe the easiest solution will be adding a new "Manage customer roles" permission (to manage customer roles in admin area > customers > customer roles) and something like "Manage customer roles for certain customers" permission (to manage customer roles in admin area > customer details page > customer roles).
How about have the option be an extension of the ACL permission "Admin Area. manage customer roles"
So, on the Customers > Customers page remove the "Customer roles" checkboxes from the initial page and add it to a tabbed page within the Customers > Customers page and call the tab, "Assigned Roles" (or whatever). Then, when the administrator unchecks the ACL permission above, two things happen:
1) The Customers > Customer Roles menu option is unaccessible (which is already the current behavior).
2) The tabbed "Assigned Roles" page under Customers > Customers disappears or displays "You do not have permission..." (depending on whether you have the "Hide admin menu items based on permissions" option checked or not).
This way you don't actually have to tweak any permissions, you just have to hide or unhide the "Assigned Roles" tab.
On other tabbed pages within the nopCommerce Admin panel, the URL doesn't change when you go to the different tabbed pages, so it wouldn't be that easy to circumvent permissions by trying to go to the url directly, etc.