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. C#
  4. How to implement User-Level security in app ?

How to implement User-Level security in app ?

Scheduled Pinned Locked Moved C#
databasehelptutorialsharepointcom
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.
  • H Offline
    H Offline
    hdv212
    wrote on last edited by
    #1

    Hi i'm looking for any example or article about how to implement user-level security for mu application. my app scenario is : 1. My app have some forms 2. Users & Roles can define in app 3. Each user must have a role 4. Each role must have it's security level (admin can select a role and give a appropriate right on selected objects(forms) to that role) How to implement this ? A Good Idea : if u familiar with SharePoint, u saw, even users can assign a permission just for an specific Item! but don't know how to that. after a lot of search, i define some tables which represent in this image : http://i44.tinypic.com/142v439.jpg as u can see in that image, my tables are these : Users : to define user Roles : to define role UserRoles : store relationship between Users and Roles (which user member of which role) Rights : to define right (like Select,Insert,Update,Delete,Report, ...) Objects : to hold all objects(can be include database objects or application objects) which must be assign security level to Permissons : to hold which role on which object have which right. and now, i want to display this form and table to user : http://i42.tinypic.com/v75gzb.jpg in the form, admin can select a role from comboBox and set appropriate permission to an specific object, but i don't know how to query tables to display this table, and how to manage this data. i think the database design is correct but getting query is main problem, i want to manage security levels like second image. any help would be great appreciated.

    D 1 Reply Last reply
    0
    • H hdv212

      Hi i'm looking for any example or article about how to implement user-level security for mu application. my app scenario is : 1. My app have some forms 2. Users & Roles can define in app 3. Each user must have a role 4. Each role must have it's security level (admin can select a role and give a appropriate right on selected objects(forms) to that role) How to implement this ? A Good Idea : if u familiar with SharePoint, u saw, even users can assign a permission just for an specific Item! but don't know how to that. after a lot of search, i define some tables which represent in this image : http://i44.tinypic.com/142v439.jpg as u can see in that image, my tables are these : Users : to define user Roles : to define role UserRoles : store relationship between Users and Roles (which user member of which role) Rights : to define right (like Select,Insert,Update,Delete,Report, ...) Objects : to hold all objects(can be include database objects or application objects) which must be assign security level to Permissons : to hold which role on which object have which right. and now, i want to display this form and table to user : http://i42.tinypic.com/v75gzb.jpg in the form, admin can select a role from comboBox and set appropriate permission to an specific object, but i don't know how to query tables to display this table, and how to manage this data. i think the database design is correct but getting query is main problem, i want to manage security levels like second image. any help would be great appreciated.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      This is fairly common. See[^] these links.

      जय हिंद

      H 1 Reply Last reply
      0
      • D dan sh

        This is fairly common. See[^] these links.

        जय हिंद

        H Offline
        H Offline
        hdv212
        wrote on last edited by
        #3

        Thanks d@nish but most of those links, explains about .net security management and some other is old (not implement custom solution which save security data in database tables)

        B 1 Reply Last reply
        0
        • H hdv212

          Thanks d@nish but most of those links, explains about .net security management and some other is old (not implement custom solution which save security data in database tables)

          B Offline
          B Offline
          buachaill cliste
          wrote on last edited by
          #4

          This[^] should work if you implement it into a Win Forms App

          H 1 Reply Last reply
          0
          • B buachaill cliste

            This[^] should work if you implement it into a Win Forms App

            H Offline
            H Offline
            hdv212
            wrote on last edited by
            #5

            The asp.net has special functionality which does not provide in winForms. i just confusing how to use those tables that i've designed in first post.

            B 1 Reply Last reply
            0
            • H hdv212

              The asp.net has special functionality which does not provide in winForms. i just confusing how to use those tables that i've designed in first post.

              B Offline
              B Offline
              buachaill cliste
              wrote on last edited by
              #6

              The only thing different in that example is the part about the cookie. In a winforms app you can connect to a database and read and write data and hash the password which is essentially the same. Correct me if I'm wrong. It might not be the best of examples but it shows the principles :-D

              H 1 Reply Last reply
              0
              • B buachaill cliste

                The only thing different in that example is the part about the cookie. In a winforms app you can connect to a database and read and write data and hash the password which is essentially the same. Correct me if I'm wrong. It might not be the best of examples but it shows the principles :-D

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

                it was helpful but does not provide a solution for my issue.

                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