Removing menu items for client logins

Discussion in 'Installation/Configuration' started by behanj, Jul 2, 2009.

  1. behanj

    behanj New Member


    I've setup ISPConfig3 on my server. I'm currently using it to manage email for clients across several domains and will eventually use it for client FTP access to their sites.
    I'd like to restrict my clients to only a few tasks when they login to their accounts. I've already removed their access to everything except help and email. But I'd like to go further and remove - Email Domain, Email Alias, Email Catchall, Email Routing and Fetchmail. My clients won't use these and they'll only confuse them.
    I'd also like to make the Email Mailbox the first page that the client sees when they login.
    I've had a look at the template files and couldn't figure out how to do this so any help would be greatly appreciated.

    As a side question - Is there a way to alert the admin when new messages arrives through the help system? Also, in the help system, the client can send messages to the admin but the Recipient ID field is blank. This might cause confusion too, so I'd like to just remove that field. (Sorry for this!)Can I make the Help system open onto the View Messages page when opened?

    Thanks for your patience,
  2. behanj

    behanj New Member


    I think I've figured out what I need to do.

    If I create a theme with only the trimmed down options that I need then I could assign that to my clients.

    But I've hit two problems -
    1 - I followed the steps from Post 4 on this thread - but I cannot select my new theme for my clients.
    The theme appears as a radio button in System/Users, but cannot be selected. In the Client section it is not in the dropdown.
    2 - The menu items seem to be generated with Javascript, how can I copy specific menu items to hardcode them into my new "client" theme?

    Thanks for your patience.

  3. behanj

    behanj New Member

    Managed a clunky solution


    Just thought I'd update this thread with my inelegant solution to this problem.

    I created the theme as per the previous link.

    I then edited the sysuser database table to force the client account to use my new template. This worked.

    I could then edit the new template and the client gets the menu items I want them to.
    I got the llinks for the menu items by using firebug - inspect element.

    One problem remains. The nav menu I created is shown when the user is logged out. Clicking on it, at the login screen, causes the ispconfig header to be repeated in the main content area of the page.
    Not a huge concern but it'd be nice to have some kind of php "if_logged_in" to disable this menu when logged out.

    Not the nicest way to do it I suppose but it's working.

    If anyone can tell me why I need to edit the db directly, instead of being able to choose themes for clients when logged in as admin, I'd appreciate it.
    Or if there's a better way to do this then I'd be happy to hear that to.

    All the best,
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    And why did you edit the table instead of simply selecting the theme in the user settings??

    Sorry but what you did is really a bit strange. Why did you not simply changed the menu file which is in the lib directory of every module?
  5. behanj

    behanj New Member

    Hi Till,

    Thanks for your reply.

    I couldn't choose the new theme in user settings. It appears in System/Users but not in the Client section of the admin area. The radio button for the theme is System/Users can't be selected. It's not greyed out or anything, it just can't be selected. If you'd like to see what I mean I can do a screencapture.

    The reason I created a theme was that I wanted the admin to have access to all the menus, but I wanted a restricted set of menus for the clients.
    I thought the best way of doing this would be to create a theme with the menus stripped out and then assign that to each client.

    Is there a better way to do this?

    Thanks again,
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to edit the menu you will hav to do this in the menu file and not the theme. The menu file for every module is named module.conf.php and it is in the lib folder of every module.
  7. behanj

    behanj New Member

    Thanks Till,

    I'll give that a try.

  8. behanj

    behanj New Member

    Hi Till,

    That worked well, thanks for the advice.
    I used the "if admin" code from one of the menus and got it to hide the options I didn't want users to see.

    Thanks again,
  9. diablo666

    diablo666 Member

    Hi behanj,
    can you do an example of code you modified?

Share This Page