Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2010
    Posts
    79
    Plugin Contributions
    0

    Default Can i hide admin menu to superuser?

    I know there is admin profile for it.

    However, some modules do not allow ordinary admin users to execute something because of security problem except superuser.

    So I want to give employee superuser.

    Is it possible not to show some admin menus to superuser like other admin users?

    For example, i do not want to show "Configuration" menu to superuser.

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Can i hide admin menu to superuser?

    Quote Originally Posted by sungmo View Post
    ... some modules do not allow ordinary admin users to execute something because of security problem except superuser.
    What modules would these be?
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,477
    Plugin Contributions
    88

    Default Re: Can i hide admin menu to superuser?

    Quote Originally Posted by swguy View Post
    What modules would these be?
    If a plugin is to be included in the admin menus, that plugin includes a file (normally in your admin's /includes/extra_datafiles folder) that contains a statement similar to:
    Code:
    define ('FILENAME_MY_PLUGIN', 'myplugin');
    If the plugin's filename definition looks like:
    Code:
    define ('FILENAME_MY_PLUGIN', 'myplugin.php');
    then that's why only superusers can access the plugin in Zen Cart 1.5.1. Simply remove that .php from the definition. I'm pretty sure that swguy submitted a change (for Zen Cart 1.5.4?) to enable those improperly-coded plugins to appear on the menu without change.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Can i hide admin menu to superuser?

    Quote Originally Posted by lat9 View Post
    I'm pretty sure that swguy submitted a change (for Zen Cart 1.5.4?) to enable those improperly-coded plugins to appear on the menu without change.
    LOL I can't even remember my own changes anymore! :)
    You are correct @lat9 - I made that change since there were so many plugins in the early days of 1.5 - including my own - which were not doing that step correctly.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Jan 2010
    Posts
    79
    Plugin Contributions
    0

    Default Re: Can i hide admin menu to superuser?

    Quote Originally Posted by lat9 View Post
    If a plugin is to be included in the admin menus, that plugin includes a file (normally in your admin's /includes/extra_datafiles folder) that contains a statement similar to:
    Code:
    define ('FILENAME_MY_PLUGIN', 'myplugin');
    If the plugin's filename definition looks like:
    Code:
    define ('FILENAME_MY_PLUGIN', 'myplugin.php');
    then that's why only superusers can access the plugin in Zen Cart 1.5.1. Simply remove that .php from the definition. I'm pretty sure that swguy submitted a change (for Zen Cart 1.5.4?) to enable those improperly-coded plugins to appear on the menu without change.
    Thanks guys...

    I am using Stock By Attribute (SBA) Stock Page Version 1.5.3

    and I already checked the file in admin/extra_datafiles/products_with_attributes_stock.php

    the file doesn't have ".php".

    you can see that code at the below

    define('FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK','products_with_attributes_stock ');
    define('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK', DB_PREFIX . 'products_with_attributes_stock');
    define('FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP','stock_by_attr_install');


    and I can not use 2 functions which are number 1 and 2 in below image except superuser.

    so I decided to edit superuser...

    someone has any solution?

    thanks


    Name:  sba.jpg
Views: 264
Size:  66.5 KB
    Last edited by sungmo; 28 May 2016 at 09:40 PM.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Can i hide admin menu to superuser?

    Maybe try posting to the SBA support thread?

    *** Removed old SBA support thread ***
    Last edited by swguy; 30 May 2016 at 01:22 PM.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Can i hide admin menu to superuser?

    As stated at an SBA forum that has been a little busier, this is not an issue if the version that is currently available on github is used. Shortly instructions are to be added to that version and it posted to ZC as the last default ZC attribute type is now handled by SBA (upload of files). There certainly remains other "improvements" possible, but it appears significantly functional.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Can i hide admin menu to superuser?

    Quote Originally Posted by mc12345678 View Post
    It might be worthwhile for you to link that thread from the README in your Github repo. It's hard to know which thread to use otherwise.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Can i hide admin menu to superuser?

    Quote Originally Posted by swguy View Post
    It might be worthwhile for you to link that thread from the README in your Github repo. It's hard to know which thread to use otherwise.
    Agree, only still not entirely sure because of the sorted history of the module what thread would actually be best. One that currently associates with an outdated version of ZC, one that implies that there is no SBA compatible with a newer version of ZC or scrap it all and start yet another...
    Just yet another confusing aspect of the plugin...
    Baby steps though I guess. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 10
    Last Post: 11 Oct 2017, 08:09 PM
  2. v154 Am I able to hide some of the menu items in admin?
    By SarahL in forum Customization from the Admin
    Replies: 7
    Last Post: 16 Jul 2015, 09:05 AM
  3. Hide admin menu
    By saweed in forum Customization from the Admin
    Replies: 2
    Last Post: 16 Aug 2011, 09:23 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR