Last post Mar 16, 2012 02:17 PM by sjnaughton
Mar 14, 2012 04:18 AM|subodh9312|LINK
I am using Dynamic data and Domain data source. I have a column 'State' of EnumDataType which should be visible only to users in a particular role. But adding attribute like [RequiresAuthentication] and [RequiresRole] does not hide the field on the list
page or on the details page.
Can you please help me in letting me know what am I missing? Am I using the attributes correctly?
Thanks for the help.
Mar 14, 2012 09:54 PM|sjnaughton|LINK
hi there see my article here
Securing Dynamic Data 4 (Replay)
Mar 16, 2012 02:12 PM|subodh9312|LINK
Thanks Steve, A quick question though is it possible to hide a particular column for unauthenticated users? I have tried hard without much help.
As per your sample, the attribute takes a parameter role for the currently logged in user.
What I am trying to do is hide the column for a Guest visitor and show it only for a logged in user. I don't want to make a compulsion that all the users of the site must be logged in.
Mar 16, 2012 02:17 PM|sjnaughton|LINK
That is exactly what my sample does, it allows you to make a column read-only base on role and or even hide the column based on role.