Announcement

Collapse
No announcement yet.

How to hide menu entries depending on authorisation table?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to hide menu entries depending on authorisation table?

    If you synchronize applications into the genereated security table things work well. But the menu entries where the user has no access to is not hidden. How do I hide these, depending on the access table? (I mean the main entries, the subitems are hidden).
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

  • #2
    Re: How to hide menu entries depending on authorisation table?

    Hello,

    Try clearing your cache before accessing the system with another user, that has no access to those items.

    regards,
    Bernhard Bernsmann

    Comment


    • #3
      Hello,
      I have 2 questions:

      1) How do you clear the cache?
      2) Why is clearing the cache not automated ?

      Comment


      • #4
        Originally posted by javierx1 View Post
        Hello,
        I have 2 questions:

        1) How do you clear the cache?
        2) Why is clearing the cache not automated ?
        That would be your browser cache. Ctrl + shift + del on google chrome.

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          Can this be automated? maybe not but I would not have to remember Ctrl + shift + del command is a thought.

          Comment


          • #6
            Originally posted by javierx1 View Post
            Can this be automated? maybe not but I would not have to remember Ctrl + shift + del command is a thought.
            Javier,

            That is actually up entirely to your browser. It has nothing to do with ScriptCase.

            regards,
            Bernhard Bernsmann

            Comment


            • #7
              Originally posted by bartho View Post
              Hello,

              Try clearing your cache before accessing the system with another user, that has no access to those items.

              regards,
              Bernhard Bernsmann
              Bernhard,

              A properly written application should not require you to clear the browser cache when switching users. The login process should clean up any session/cached information that may have been left from the previous user. Otherwise, this represents a security risk because the new user may not have access to entried (and we may not even want them to KNOW that there is an entry).

              Nick

              Comment


              • #8
                Originally posted by vrtisworks View Post
                Bernhard,

                A properly written application should not require you to clear the browser cache when switching users. The login process should clean up any session/cached information that may have been left from the previous user. Otherwise, this represents a security risk because the new user may not have access to entried (and we may not even want them to KNOW that there is an entry).

                Nick
                Hello Nick,

                I totally agree.

                This issue happens when you are developing an application. Once you have you have deployed that application, the issue no longer happens.

                regards,
                Bernhard Bernsmann

                Comment


                • #9
                  So I am to assume this is fixed because not everyone uses Google Chrome and I am sure the command is not the same for all.

                  I am trying this code below on my menu app but nothing works!!!.

                  // None of this stuff below is working, it does nothing at all no errors and I can access anything with any user -- >> can someone look and tell me what is wrong ???? !!!
                  if ([usr_login] == 'admin') {
                  // nothig
                  }
                  else {
                  sc_apl_status ('item_21', 'off');
                  sc_apl_status ('item_29', 'off');
                  }

                  if ([usr_login] == 'admin') {
                  // nothig
                  }
                  else {
                  sc_apl_status ('lang_menu_security', 'off');
                  sc_apl_status ('Maintenance', 'off');
                  }

                  if ([usr_login] == 'admin') {
                  // nothig
                  print "Administrator logged in : " .[usr_login]. "<br/>";

                  }
                  else {
                  print "Non-Administrator logged in : " .[usr_login]. "<br/>";
                  sc_menu_delete('item21'); // hide Maintenance
                  sc_menu_delete('item29'); // hide security
                  }

                  Comment


                  • #10
                    Try in the onLoad() event in the Menu, it is the only event I made it works.

                    Comment


                    • #11
                      I am yet able to get this to work. I just want to hide various menu items based upon the type/level of user logging in

                      Now looking at the above
                      sc_menu_delete('item21'); // hide Maintenance

                      Excuse the ignorance but the word "delete" in sc_menu_delete() , implies that that menu it will be Deleted (not hidden). And since you say must be run in production before you see it working, this can have some rather devastating affects.

                      Can some please comment, if this means delete/hide for that logged in user, or does it mean delete from the menu structure?

                      Comment

                      Working...
                      X