creating admin roles

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 12 años
hello,

is it possible to create more than one admin roles

we have few managers at different locations

would like to give them their own admin user id and password

and each of them should have their own area where they manage their product list and should have all the privledges
like main administrator.

regards,
Hace 12 años
Sure. Create a new customer role and grant it "admin area access" on ACL page (Admin area > Configuration > Access Control List)
Hace 12 años
is it possible for each manager have his own profile area and they won't be able to create, update, delete and view other managers area in admin section.

main admin should be able to view everything and should be able to perform crud operation on everything.


regards,
Hace 12 años
lubish wrote:
is it possible for each manager have his own profile area and they won't be able to create, update, delete and view other managers area in admin section.

main admin should be able to view everything and should be able to perform crud operation on everything.


regards,


I do not think this is possible unless you were to code it yourself. It could be a relatively simple project; inside of the new action you would just need to verify that the profile being viewed/edited is not an admin or the current user.
Hace 12 años
I am trying to do something similar.  I want to create additional Admin accounts that don't have access to the ACL.  To do this, I assigned a use to the Forum Administrator role, then gave that role access to everything except the ACL.  Everything seems to work as intended except that when I use this new account to upload a new picture, I get an error.

I tried several combinations of roles including creating a new role but it appears that the picture upload feature will only work for a user that is assigned to the "administrator" role.

Is this by design?  If so, why is the picture upload feature restricted to only users in the "administrator" role?
Hace 12 años
SwimmingWorld wrote:
I am trying to do something similar.  I want to create additional Admin accounts that don't have access to the ACL.  To do this, I assigned a use to the Forum Administrator role, then gave that role access to everything except the ACL.  Everything seems to work as intended except that when I use this new account to upload a new picture, I get an error.

I tried several combinations of roles including creating a new role but it appears that the picture upload feature will only work for a user that is assigned to the "administrator" role.

Is this by design?  If so, why is the picture upload feature restricted to only users in the "administrator" role?


Supposing that you are using one of the 2.xx versions you may try to access the pictureController.cs (Nop.Admin > Controllers > PictureController.cs ) and update the InsertPicture method (validation section) as  below

Old:
   var customer = ((FormsAuthenticationService)_authenticationService).GetAuthenticatedCustomerFromTicket(ticket);
            if (!customer.IsAdmin())
            throw new Exception("User is not admin");

New:
var customer = ((FormsAuthenticationService)_authenticationService).GetAuthenticatedCustomerFromTicket(ticket);
if (!customer.IsAdmin() && !customer.IsForumModerator())
  throw new Exception("User is not admin");

you may validate for your own created role.
Hace 12 años
Thanks, I will give this a try.
Hace 12 años
It took me a long time to find the source file you referenced.  I have the source for version 2.1 and here is where the PictureController file is.

\Presentation\Nop.Web\Administration\Controllers\PictureController.cs
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.