limiting control's visibility by user account
| Author | Topic |
|---|---|
| Renukadevi Shanmugasundaram Member Joined: 14 Jul 2006 Country: Australia Posts: 15 | Hi, Hi,I have a web form which has permission to different user groups but i like to control few field's visibility for few user groups. Actually there is another thing i need to consider. I will explain the situation with example: The configuration file has the following settings <location path="iApprove/Doctor"> <system.web> <authorization> <allow roles="role1, role2, role3" /> <deny users="*"></deny> </authorization> </system.web> </location> A user may be under more than one user group and each group has different functionality. User1 is under Role1 and Role2 User2 is only under Role2 The specified location can have access by both role1 and role2, but user from only role2 cannot have access to few fields in a page. So far am having user's role saved in FormAuthenticationTicket as DataUser and i need to check their Roles list with the list specified under the configuration <location> tag to make sure the user is only under role2 to invisible the fields. I hope it explains well. Now, is it possible reading config file's <location>? if so, please tell me how. If not could you please give me few other suggestion to achieve it? Expecting reply... Thanks Renu |
| Jim Cady Member Joined: 06 Aug 2006 Country: Posts: 1 | I think what you need to look at is the loginview control. this will do the trick for you I think what you need to look at is the loginview control. this will do the trick for youdotnetjunkies.com/QuickStartv20/aspnet/doc/ctrlref/login/loginview.aspx |
| Renukadevi Shanmugasundaram Member Joined: 14 Jul 2006 Country: Australia Posts: 15 | Hi Jim, Hi Jim,Thank you so much for your response. It sounds really perfect solution to my problem but, It looks like LoginView Control is available in .Net 2, is it also available in .Net 1? I am working with version 1.1 Thanks, Renu <BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Hi, I have a web form which has permission to different user groups but i like to control few field's visibility for few user groups. Actually there is another thing i need to consider. I will explain the situation with example: The configuration file has the following settings <location path="iApprove/Doctor"> <system.web> <authorization> <allow roles="role1, role2, role3" /> <deny users="*"></deny> </authorization> </system.web> </location> A user may be under more than one user group and each group has different functionality. User1 is under Role1 and Role2 User2 is only under Role2 The specified location can have access by both role1 and role2, but user from only role2 cannot have access to few fields in a page. So far am having user's role saved in FormAuthenticationTicket as DataUser and i need to check their Roles list with the list specified under the configuration <location> tag to make sure the user is only under role2 to invisible the fields. I hope it explains well. Now, is it possible reading config file's <location>? if so, please tell me how. If not could you please give me few other suggestion to achieve it? Expecting reply... Thanks Renu <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote> |
Posted: 17 Jul 2006 04:08:22










