Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Customize admin area according user permission.

 
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-11-2017, 04:16 AM
 
ajeetsingh ajeetsingh is offline
 

Member
  
Join Date: Dec 2016
Posts: 28
 

Default Customize admin area according user permission.

Hello x-cart Team,

I have an issue that how to assign a particular admin left-menu item access to a particular user except main administrator. Is It possible in x-cart? please suggest.

Now i am explaining in better way below. So Please suggest me.

1. I have a main admin login account already who has a full access of the admin area.
2. Again i am creating another user account a administrator and want that user to particular left menu like : when i login with that user account in x-cart back-end then he has only access to see the Module option in x-cart admin area.
3. So my question is that, Is it possible in x-cart and if possible then please let me explain that how it is possible.

I am waiting for a response. So please suggest me the way that how i fix my issue.

Thank you in advance.
Have a nice day.
__________________
Ajeet Singh
Sr.Software Developer
Webkul Software Pvt. Ltd.
Reply With Quote
  #2  
Old 04-11-2017, 05:12 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Customize admin area according user permission.

There is a module that allows you to create user roles and grant permissions:
https://market.x-cart.com/addons/user-permissions.html

The Modules page is visible only to those users who has a role with the "Root access" permission.

So, you can create other role (e.g. "Shop administrator") and give it every permission except "Root access". This will hide Modules page (and some other system pages) from users having this role.

Is it what you are looking for?
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	46
Size:	207.7 KB
ID:	4893  
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions

Last edited by qualiteam : 04-11-2017 at 05:14 AM.
Reply With Quote
  #3  
Old 04-11-2017, 05:42 AM
 
ajeetsingh ajeetsingh is offline
 

Member
  
Join Date: Dec 2016
Posts: 28
 

Default Re: Customize admin area according user permission.

Hello Qualiteam,

I have followed your suggestion and its work. But my query is that i also want to show Module option in left menu and hide other options like "store setup", "Look and fell" and "System Setting".
__________________
Ajeet Singh
Sr.Software Developer
Webkul Software Pvt. Ltd.
Reply With Quote
  #4  
Old 04-11-2017, 08:13 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Customize admin area according user permission.

This is the class that controls the Modules page:
https://github.com/xcart/xcart5/blob/master/src/classes/XLite/Controller/Admin/Module.php

You should decorate it from your custom module, add the checkACL() method and change it so that the page is visible to users that you need. You can find this method in the parent class:
https://github.com/xcart/xcart5/blob/master/src/classes/XLite/Controller/Admin/AAdmin.php

Also, you may need to decorate the following classes from your custom module:
- https://github.com/xcart/xcart5/blob/3baf515b75d0155444353fca15545c9a655411bc/src/classes/XLite/View/Menu/Admin/LeftMenu.php
- https://github.com/xcart/xcart5/blob/c8b4fa7834a61239735f84527b4095723304e6fc/src/classes/XLite/View/Menu/...place/Menu.php
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Modifying the design and features (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:45 PM.

   

 
X-Cart forums © 2001-2020