开发者

How to control access control?

开发者 https://www.devze.com 2023-02-07 00:27 出处:网络
I have asp.net project which has got GridViews, Buttons, Navigators etc... I have 10-15 role types. For example:
  • I have asp.net project which has got GridViews, Buttons, Navigators etc...
  • I have 10-15 role types. For example:

Access Management must be:

Products.aspx

  • RoleType1 can see GridView1, Gv2, Gv3(But can not see Gv3's colum开发者_开发问答n2)

  • RoleType2 can see Gv1,Gv2 (But can not see Gv2's column3), Gv3( (But can not see Gv3's Column4)

Also:

  • RoleType3 can see button1, button2 (But can not see Button3), Can see Gv2(But can not see Gv2's column3)

ProductsDetail.aspx

  • RoleType1 can see GridView1,Gv3, Gv2(But can not see Gv2's column3),Gv4
  • RoleType2 can see Gv3,Gv4 (But can not see Gv3's column3), Gv4( (But can not see Gv4's Column4)

Also:

  • RoleType3 can see button3, button4 (But can not see Button1), Can see Gv2(But can not see Gv2's column5)

I can create more fantastic scenario. how can I manage this role? i want to separate this role types from WEB.CONFIG.

For example I can write sql db this role and than I create an xml and than write xml from db. Do you have any idea to make it?


Have you looked at Microsoft-s AzMan-Authorization Manager ?

It contains an API to program against to ask CanSeeGridView1, CanSeeGridView2, ...

and a gui (azman.msc) where you can define roles and map rights (RoleType1 can see GridView1) and store them in an xml-file.

0

精彩评论

暂无评论...
验证码 换一张
取 消