Role Based Solution - Help

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Role Based Solution - Help

    Hi

    I am trying to decide on the best way to implement a role based security
    solution for a dotNET website.

    I am keen to use the Identities, roles and principals provided with dotnet
    framework, but i am unsure how to implement the following scenario and
    wondered if someone could shed some light on the best way to do so in a VB
    manner.

    Situation:

    A logged on user can have different roles for the many different companies
    he is asisgned to administer, eg:
    Company A - he can add, amend staff
    Company B - he can only amend staff
    Company C - he can only view staff details

    (only showing three companies here, but there could be any number of
    companies he, or others, are assigned to - and many areas of functionality)

    My initial thought was that once he had logged in i would pick up from a
    permissions table the companies he has been assigned to and his respective
    permission(s) for each company into a multi-dimensional array.

    On each page that required it - I would have to loop the permissions to see
    if they can carry out that particular task for a particular company and
    enable/disable the controls thereafter.

    As i say i like the idea of using the frameworks identities, roles, etc but
    aware that i could realistically on store one set of permissions for one
    company within this without implementing my own subclass.

    Can anyone suggest which way would be the best to implement and any links to
    example VB code? Eg, if i was to go for the multi-array where is the best
    place initialise it and store it for global access for that persons session.

    I am pretty new to the dotnet arena and want to make sure i use the most
    scalable solution using what is now available in dotnet - trouble is i need
    to get onto this quickly and cant seem to read all the dotnet books i have
    quickly enough..... So hoping someone can help me jump start this!

    Many thanks in advance!



    dave Guest

  2. Similar Questions and Discussions

    1. Do I need Role Based Security
      Corinna, In your example i'd say its not necessary to use role-based security. Since there's only 1 level of membership as you say then all I...
    2. Role-Based Authorization
      I am using ASP.NET and Access as the database. I would like to use role-based authorization for the login page. Can anyone help me?
    3. Reg Role BAsed security..
      Hi All.. Can any body detail out the basic diff/advatages/disadvantage over acheiving the role based security and the same thing in case of...
    4. Help please with Role based security not working.
      Hello All, I am trying to use the .Net built in role based security. It is not working. The web config has the following; <authorization> ...
  3. #2

    Default Re : Role Based Solution - Help

    The Best bet would be to use Forms Authentication along
    with Roles stored in DB. Check out the folllowing link

    [url]http://www.4guysfromrolla.com/webtech/121901-1.shtml[/url]

    - Gopi

    >-----Original Message-----
    >Hi
    >
    >I am trying to decide on the best way to implement a
    role based security
    >solution for a dotNET website.
    >
    >I am keen to use the Identities, roles and principals
    provided with dotnet
    >framework, but i am unsure how to implement the
    following scenario and
    >wondered if someone could shed some light on the best
    way to do so in a VB
    >manner.
    >
    >Situation:
    >
    >A logged on user can have different roles for the many
    different companies
    >he is asisgned to administer, eg:
    > Company A - he can add, amend staff
    > Company B - he can only amend staff
    > Company C - he can only view staff details
    >
    >(only showing three companies here, but there could be
    any number of
    >companies he, or others, are assigned to - and many
    areas of functionality)
    >
    >My initial thought was that once he had logged in i
    would pick up from a
    >permissions table the companies he has been assigned to
    and his respective
    >permission(s) for each company into a multi-dimensional
    array.
    >
    >On each page that required it - I would have to loop the
    permissions to see
    >if they can carry out that particular task for a
    particular company and
    >enable/disable the controls thereafter.
    >
    >As i say i like the idea of using the frameworks
    identities, roles, etc but
    >aware that i could realistically on store one set of
    permissions for one
    >company within this without implementing my own subclass.
    >
    >Can anyone suggest which way would be the best to
    implement and any links to
    >example VB code? Eg, if i was to go for the multi-array
    where is the best
    >place initialise it and store it for global access for
    that persons session.
    >
    >I am pretty new to the dotnet arena and want to make
    sure i use the most
    >scalable solution using what is now available in dotnet -
    trouble is i need
    >to get onto this quickly and cant seem to read all the
    dotnet books i have
    >quickly enough..... So hoping someone can help me jump
    start this!
    >
    >Many thanks in advance!
    >
    >
    >
    >.
    >
    S Gopikrishna Guest

  4. #3

    Default Re: Role Based Solution - Help

    Thanks for that - i have actually read that and understand the idea behind
    it, but how could i extend that so that i could store (for example) three
    (or more) sets of roles for different companies a person has been assigned
    to.

    Eg, if he clicks on Company A in list then it will find the permissions
    allowed for that company, ie can only amend the details, but then if he
    clicks on Company B he can amend, add and delete.

    Is it possible to store a multi-dimensional array in a CurrentPrinicipals
    roles, as i dont want to have to do a DB lookup every time.

    If it is possible to store a multi-dim array, then how would i loop through
    it using
    "IsInRole()" method - eg finding out if he can amend details for comany ID
    1.

    Thanks in advance!






    "S Gopikrishna" <sgkishen@yahoo.com> wrote in message
    news:058301c3a4e2$c4e741c0$a501280a@phx.gbl...
    > The Best bet would be to use Forms Authentication along
    > with Roles stored in DB. Check out the folllowing link
    >
    > [url]http://www.4guysfromrolla.com/webtech/121901-1.shtml[/url]
    >
    > - Gopi
    >
    >
    > >-----Original Message-----
    > >Hi
    > >
    > >I am trying to decide on the best way to implement a
    > role based security
    > >solution for a dotNET website.
    > >
    > >I am keen to use the Identities, roles and principals
    > provided with dotnet
    > >framework, but i am unsure how to implement the
    > following scenario and
    > >wondered if someone could shed some light on the best
    > way to do so in a VB
    > >manner.
    > >
    > >Situation:
    > >
    > >A logged on user can have different roles for the many
    > different companies
    > >he is asisgned to administer, eg:
    > > Company A - he can add, amend staff
    > > Company B - he can only amend staff
    > > Company C - he can only view staff details
    > >
    > >(only showing three companies here, but there could be
    > any number of
    > >companies he, or others, are assigned to - and many
    > areas of functionality)
    > >
    > >My initial thought was that once he had logged in i
    > would pick up from a
    > >permissions table the companies he has been assigned to
    > and his respective
    > >permission(s) for each company into a multi-dimensional
    > array.
    > >
    > >On each page that required it - I would have to loop the
    > permissions to see
    > >if they can carry out that particular task for a
    > particular company and
    > >enable/disable the controls thereafter.
    > >
    > >As i say i like the idea of using the frameworks
    > identities, roles, etc but
    > >aware that i could realistically on store one set of
    > permissions for one
    > >company within this without implementing my own subclass.
    > >
    > >Can anyone suggest which way would be the best to
    > implement and any links to
    > >example VB code? Eg, if i was to go for the multi-array
    > where is the best
    > >place initialise it and store it for global access for
    > that persons session.
    > >
    > >I am pretty new to the dotnet arena and want to make
    > sure i use the most
    > >scalable solution using what is now available in dotnet -
    > trouble is i need
    > >to get onto this quickly and cant seem to read all the
    > dotnet books i have
    > >quickly enough..... So hoping someone can help me jump
    > start this!
    > >
    > >Many thanks in advance!
    > >
    > >
    > >
    > >.
    > >

    dave Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139