Database design for role security table RRS feed

  • Question

  • I am looking for some direction on creating my person, role classes and teh design of the tables.


    I am looking to implement security that will allow the role to be set to Add, View, Delete, Print for each specific area.  I think the easiest way would be to have the table

    (RoleId, ContactAdd as boolean, ContactView as boolean, ContactDelete as boolean, ContactPrint as boolen, ActivityAdd as boolean, ActivityView as boolean, ActivityDelete as boolean, ActivityPrint as Boolean)


    Or (RoleId, AreaId, Add, View, Delete, Print)

    (1, Contact, True, False, True, False)


    But then when I create my class do I create the Role and then assign these as properties, going out to the database for each Area ID.


    Role.Contact.Add = True


    Thanks for the assistance, and if you know of any examples those would be very helpful!

    Thursday, April 26, 2007 3:45 PM


  • ashleyT2,


    According to your demand and based on my search, I hope the following two articles can help you to understand the problem better:


    1. How to create a custom rule for dimension security in a database role




    Please follow the steps in the article to create a custome rule for dimension security in a database role.


    2. How To Implement Forms-Based Authentication in Your ASP.NET Application by Using Visual Basic .NET



    Please try the sample code in the article especially the SQL script code and VB.NET code.

    Thursday, May 3, 2007 7:24 AM