Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Join Date
    Sep 2006
    Posts
    28
    Plugin Contributions
    0

    Restrict admins to certain areas?

    Is there a way to restrict an admin to certain areas of the site?

    For example, I wish to allow someone access to the catalog area for product entry but not to other areas of the admin.
    Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Restrict admins to certain areas?

    There is an Admin Profiles contribution in the Downloads area which adds support for this.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Sep 2006
    Posts
    28
    Plugin Contributions
    0

    Default Re: Restrict admins to certain areas?

    That was perfect!

    In case anyone else is interested, the link to Admin Profiles is: http://www.zen-cart.com/index.php?ma...products_id=86

    Thank you very much DrByte. :)
    Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a person does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses their intelligence.

  4. #4
    Join Date
    Nov 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Restrict admins to certain areas?

    Hi dudes

    this solution is brilliant!

    (make sure to install the sql patch through the admin area before uploading the files, from the link above!)

    I have a question! is it posible to restrict specific products for admin uses as well?

  5. #5
    Join Date
    Nov 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Restrict admins to certain areas?

    Is there any way of customizing the admin home page and provide a link on it for individual admin users?

    Many thanks

    Matt

    http://www.designsdirect.co.uk

  6. #6
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Restrict admins to certain areas?

    provide a link on it for individual admin users?
    Interesting suggestion but may I ask where would the link points actually ? To which page would you link to point the URL for these specific admins from the index page exactly ?

  7. #7
    Join Date
    Nov 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Restrict admins to certain areas?

    i would want a specific user to have acccess to only one product! so the link would be directed to a single product that they can update themselves!

    when an admin user updates their product i have put a simple redirect code at the end of the denied.php file inside the admin profiles download!

    <?php
    echo 'Sorry, your security clearance does not allow you to access this resource.<br /><br />
    Please contact your site administrator if you believe this to be incorrect.<br /><br />
    Sorry for any inconvenience.';

    ?>
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/admin/index.html">

    This is following an idea to create a recruitement agency website using the zen cart!

  8. #8
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Restrict admins to certain areas?

    Hum ... I guess this request is really for implementing into the admin profiles MOD. If so, I believe the author of that MOD could help you out under her / his official topic.

    However, I do have a little suggestion.

    PHP Code:
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/admin/index.html"
    replace with:

    PHP Code:
    <?php echo zen_redirect(zen_href_link(FILENAME_DEFAULT'''NONSSL')); ?>

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Restrict admins to certain areas?

    Quote Originally Posted by designsdirect View Post
    i would want a specific user to have acccess to only one product! so the link would be directed to a single product that they can update themselves!
    When an admin user logs in a session variable with their admin_id is created.

    You could read this session variable to determine which user has logged in and use a conditional or switch statement in admin/index.php to present them with just a link to their product.

    However, you would have to set each link up individually (or write more complex code to create database entries) and this would not prevent them from experimenting with the URL to access other products.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #10
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Restrict admins to certain areas?

    and this would not prevent them from experimenting with the URL to access other products.
    There's a possibility of blocking this utility from unauthorized admin IDs actually. Perhaps I could create an individual restricted products MODs so that only authorized admins would be able to either, update or delete that particular product if needed.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v151 Can I restrict certain shipping modules for certain products?
    By gumboot in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 13 Feb 2013, 05:26 AM
  2. Replies: 2
    Last Post: 30 Jul 2012, 06:30 PM
  3. Can I restrict certain payment methods for certain products?
    By one tall man in forum Built-in Shipping and Payment Modules
    Replies: 27
    Last Post: 6 Apr 2011, 08:40 PM
  4. restrict shipping certain products to certain states?
    By airtime in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 18 Jan 2011, 05:11 AM
  5. I need to restrict category access to only certain admins. How can I do this?
    By bparker in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Sep 2009, 05:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg