Answered by:
Hiding a particular field for only authenticated users

Question
-
User-1656123599 posted
Hi,
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.
Wednesday, March 14, 2012 12:18 AM
Answers
-
User-330204900 posted
hi there see my article here Securing Dynamic Data 4 (Replay)
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 14, 2012 5:54 PM -
User-330204900 posted
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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, March 16, 2012 10:17 AM
All replies
-
User-330204900 posted
hi there see my article here Securing Dynamic Data 4 (Replay)
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 14, 2012 5:54 PM -
User-1656123599 posted
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.
Thanks for the help.
Friday, March 16, 2012 10:12 AM -
User-330204900 posted
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.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, March 16, 2012 10:17 AM