Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Menu bars based on users.............

Menu bars based on users.............

Scheduled Pinned Locked Moved Visual Basic
help
7 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Member 3879881
    wrote on last edited by
    #1

    Hi i have tried menubars in my form, i got the solution........, But now i need that menubars want to display based on the user rights..., if he dont have rights for some menus that wont display,when he logged on in that time, i tried that probs using some flags...., but i didnt get solution...., anyone plz help me......, i need that codes........, Regards, Magesh

    Magesh

    H J 2 Replies Last reply
    0
    • M Member 3879881

      Hi i have tried menubars in my form, i got the solution........, But now i need that menubars want to display based on the user rights..., if he dont have rights for some menus that wont display,when he logged on in that time, i tried that probs using some flags...., but i didnt get solution...., anyone plz help me......, i need that codes........, Regards, Magesh

      Magesh

      H Offline
      H Offline
      haggenx
      wrote on last edited by
      #2

      not work with flags?, can you show me the code?, you systems must check the username, set flags to this users and enabled/unabled menus.

      Manuel say: Greetings from Mexico, Cuando salga el sol, no estare aqui... --------------------------------------- Web: http://www.otakuzone-fanzine.com Forum: http://www.otakuzone-fanzine.com/foro

      M 1 Reply Last reply
      0
      • M Member 3879881

        Hi i have tried menubars in my form, i got the solution........, But now i need that menubars want to display based on the user rights..., if he dont have rights for some menus that wont display,when he logged on in that time, i tried that probs using some flags...., but i didnt get solution...., anyone plz help me......, i need that codes........, Regards, Magesh

        Magesh

        J Offline
        J Offline
        Jelle Stokroos
        wrote on last edited by
        #3

        Sorry, Are you looking for VB6 or VB.NET solution? Sounds like you should have the access rights setup for a users group and check with IsInRole method of a WindowsPrincipal object. Is that the path you like to take? Jelle

        M 1 Reply Last reply
        0
        • J Jelle Stokroos

          Sorry, Are you looking for VB6 or VB.NET solution? Sounds like you should have the access rights setup for a users group and check with IsInRole method of a WindowsPrincipal object. Is that the path you like to take? Jelle

          M Offline
          M Offline
          Member 3879881
          wrote on last edited by
          #4

          Hi i am using vb.net...., Using javascript i displayed menubars in my form, now i want to dispaly the menubars based on the user rights..., If u know plz send me the code........,

          Magesh

          J H 2 Replies Last reply
          0
          • H haggenx

            not work with flags?, can you show me the code?, you systems must check the username, set flags to this users and enabled/unabled menus.

            Manuel say: Greetings from Mexico, Cuando salga el sol, no estare aqui... --------------------------------------- Web: http://www.otakuzone-fanzine.com Forum: http://www.otakuzone-fanzine.com/foro

            M Offline
            M Offline
            Member 3879881
            wrote on last edited by
            #5

            Hi used javascript and displayed menubars in my form.., See each menu have submenus..., i given for each form pageno(its the flag)..., my ques is very critical, take eg like.. two menus are there..., in that two menus have 3,3 submenus.., now one user can access in that first menu 2 forms and second menu 1 form...., another can access in first menu 3 forms and second menu two forms..., now how u can tell...,in that login page these are the forms menus only want to display like......, regards,

            Magesh

            1 Reply Last reply
            0
            • M Member 3879881

              Hi i am using vb.net...., Using javascript i displayed menubars in my form, now i want to dispaly the menubars based on the user rights..., If u know plz send me the code........,

              Magesh

              J Offline
              J Offline
              Jelle Stokroos
              wrote on last edited by
              #6

              So VB.NET it is. I do not understand the rest of your comments. I would build the menu's in full form and not enable the items that an UserGroup can not use or hid the menu item altogether if that is preferred. For doing so: You can decorate you menu creation with; 'Get a WindowsIdentity object for the current user. NameSpace: System.Security.Principal Dim currentIdentity as WindowsIdentity = WindowsIdentity.GetCurrent() 'The WindowsPrincipal class can give access to the user's group memberships Dim currentPrincipal as WindowsPrincipal = New WindowsPrincipal(currentIdentity) And use the following to test if menu items should be "not enabled" or "hidden". if currentPrincipal.IsInRole("DOMAIN/Group Name") Then ' substitute DOMAIN and Group Name 'Do your menu item setting End if Clean up you objects. IsInRole can to with a Try block. I hope it is something like this you are after. Else I possibly can do with some code. Jelle

              1 Reply Last reply
              0
              • M Member 3879881

                Hi i am using vb.net...., Using javascript i displayed menubars in my form, now i want to dispaly the menubars based on the user rights..., If u know plz send me the code........,

                Magesh

                H Offline
                H Offline
                haggenx
                wrote on last edited by
                #7

                asp.net not work with javascript (directly), maybe you should enabled/unabled these menus with javascript and not with asp.net, this menus will be layers, with javascript activate this layers, the flags must take yours values from asp by strings or cookies and then activate the layers.

                Manuel say: Greetings from Mexico, Cuando salga el sol, no estare aqui... --------------------------------------- Web: http://www.otakuzone-fanzine.com Forum: http://www.otakuzone-fanzine.com/foro

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups