Results 1 to 6 of 6

Thread: custom module accessible for for admin users

  1. #1
    sinimuhammed is offline Junior Member
    Join Date
    Jan 2009
    Posts
    2

    Default custom module accessible for for admin users

    I have created a custom module using the module builder. Can anybody please tell me how this module can be accessed only by the admin. I do not want non admin users to access the module.

  2. #2
    daniel.passarini's Avatar
    daniel.passarini is offline Sugar Community Member
    Join Date
    Apr 2006
    Location
    São Paulo - SP / Brasil
    Posts
    80

    Default Re: custom module accessible for for admin users

    You can create a specific Role to admin tha have access to this module
    Daniel de Carvalho Passarini

    "Fascinating" - Dr. Spock

  3. #3
    genius786's Avatar
    genius786 is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Karachi, Pakistan
    Posts
    129

    Smile Re: custom module accessible for for admin users

    Try to change or define Role according to your above needs.



    Best regards,
    SARFARAZ AHMED KHAN
    Karachi, Pakistan
    skype: genius_crystal
    genius_crystal@hotmail.com
    92-314-2595624

  4. #4
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: custom module accessible for for admin users

    Use the Role Management or hide it be default for all other users.

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: custom module accessible for for admin users

    Or add to the admin only list. The $adminOnlyList array exists in include/modules.php. You can do this in an upgrade-safe manner by creating a file like MyModuleName.php in custom\Extension\application\Ext\Include with the contents:
    PHP Code:
    $adminOnlyList ['MyModuleName'] =array('all'=>1); 
    You'll then need to do a repair/rebuild all to get it to push to the modules.ext.php file in custom\application\Ext\Include.

  6. #6
    sinimuhammed is offline Junior Member
    Join Date
    Jan 2009
    Posts
    2

    Default Re: custom module accessible only for admin users

    By default the module is enabled for all the roles. So I created a role for which the specific module is disabled. It worked. But the problem is the admin need to add each of the users to the specified role to make it disabled.
    I also tried the approach suggested by eggsurplus ,but that doesn't work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. custom module not accessible/visible as tab
    By jmassey119 in forum Help
    Replies: 4
    Last Post: 2009-04-15, 06:49 AM
  2. Custom module not accessible by non-admin users
    By jasv in forum Developer Help
    Replies: 3
    Last Post: 2009-02-02, 01:44 PM
  3. Replies: 3
    Last Post: 2008-05-20, 12:38 PM
  4. Replies: 1
    Last Post: 2008-01-01, 08:03 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
  •