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. Web Development
  3. ASP.NET
  4. User access and options validation

User access and options validation

Scheduled Pinned Locked Moved ASP.NET
tutorial
5 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.
  • E Offline
    E Offline
    emiaj
    wrote on last edited by
    #1

    Hello everyone, so we have an ASP Net project witch need to show/hide/disable/enable some controls in the page and allow/deny access according to the credentials of the user logged (role based). Right now all this process is due manually, every control has its own logic, the same for every page. I do not want my homework due by yours, just some guidelines on how to accomplish this task in the most easy and clean way. p.s: Sorry for my bad english.

    P B 2 Replies Last reply
    0
    • E emiaj

      Hello everyone, so we have an ASP Net project witch need to show/hide/disable/enable some controls in the page and allow/deny access according to the credentials of the user logged (role based). Right now all this process is due manually, every control has its own logic, the same for every page. I do not want my homework due by yours, just some guidelines on how to accomplish this task in the most easy and clean way. p.s: Sorry for my bad english.

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      You haven't specified how you are managing user details in your application. The Membership and Role APIs in ASP.NET 2.0 help you with controlling access to functionality. For instance, limiting access to pages based on a user's role can be defined declaratively in the web.config. To configure layout based on user role, you could consider using the MultiView and View controls and defining different page layout views for different types of users.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      E 1 Reply Last reply
      0
      • P pmarfleet

        You haven't specified how you are managing user details in your application. The Membership and Role APIs in ASP.NET 2.0 help you with controlling access to functionality. For instance, limiting access to pages based on a user's role can be defined declaratively in the web.config. To configure layout based on user role, you could consider using the MultiView and View controls and defining different page layout views for different types of users.

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        E Offline
        E Offline
        emiaj
        wrote on last edited by
        #3

        Thanks for you response. I did not start this project, i am being assigned to solve this problem. All the security is Session based, something like that : If Session("User") Is Nothing Then Response.Redirect("Login.aspx") End If Ugly isn't?? By the way, all those settings (groups, users, permissions, allowed actions, allowed pages) come from a database, so the web.config is not an option. I will check your recommendations and see if those changes are doable without much headache. Cheers.

        1 Reply Last reply
        0
        • E emiaj

          Hello everyone, so we have an ASP Net project witch need to show/hide/disable/enable some controls in the page and allow/deny access according to the credentials of the user logged (role based). Right now all this process is due manually, every control has its own logic, the same for every page. I do not want my homework due by yours, just some guidelines on how to accomplish this task in the most easy and clean way. p.s: Sorry for my bad english.

          B Offline
          B Offline
          bokuceres
          wrote on last edited by
          #4

          hello emiaj well u can always use panel control. and grouping your control based on user's role. with this, you just customize one panel control instead many controls. i hope this will help your "homework" :) . best, boku

          E 1 Reply Last reply
          0
          • B bokuceres

            hello emiaj well u can always use panel control. and grouping your control based on user's role. with this, you just customize one panel control instead many controls. i hope this will help your "homework" :) . best, boku

            E Offline
            E Offline
            emiaj
            wrote on last edited by
            #5

            Hello Boku, thanks for you response. The panel strategy could be an option. Cheers.

            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