creating admin roles

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
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,
12 years ago
Sure. Create a new customer role and grant it "admin area access" on ACL page (Admin area > Configuration > Access Control List)
12 years ago
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,
12 years ago
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.
12 years ago
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?
12 years ago
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.
12 years ago
Thanks, I will give this a try.
12 years ago
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.