• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Limit Menu Options by User

    Scheduled Pinned Locked Moved
    FOG Problems
    2
    4
    327
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jmvela2x
      last edited by

      I have two users (using the Access Controls plugin) and want to limit the menu items available to one user. Is there a way to set the menu up to have a login on initial boot and based on the credentials entered, limit what options are displayed? I want everything to be seen by admin users and technician users should only see Memtest and Deploy Image.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @jmvela2x Can’t give you a complete answer (with all the code) on how to do this but I might give you some hints. First you can hide/disable menu items. Then you’d need to create custom iPXE menu items for login and subsequent menus depending on the credentials used.

        Other than that you can modify the PHP code to achieve what you want.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        J 1 Reply Last reply Reply Quote 0
        • J
          jmvela2x @Sebastian Roth
          last edited by

          @Sebastian-Roth I’m aware of the ability to hide menu options, but there are certain things I need accessible to admins that normal users shouldn’t see. I see an Advanced Menu, but it doesn’t work how I imagined it might in that I cannot set menu items to appear there and enable it with login and only see them after selecting it. Is there a Wiki resource for the ipxe menu for 1.5.9? I have found some information, but a lot of it seems outdated at this point.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by

            @jmvela2x Sorry, lost track of this.

            Here you have a template for an advanced menu:

            #!ipxe
            :ADVMENU
            menu
            colour --rgb 0x00567a 0 ||
            cpair --foreground 1 1 ||
            cpair --foreground 0 3 ||
            cpair --foreground 4 4 ||
            item item1 Do this
            item item2 Do that
            item item3 Go back to main menu
            choose --default item1 --timeout 6000 target && goto ${target}
            :item1
            echo "Do this" || goto ADVMENU
            :item2
            echo "Do that" || goto ADVMENU
            :item3
            chain -ar http://${fog-ip}/fog/service/ipxe/boot.php || goto ADVMENU
            

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            275

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project