views:

20

answers:

0

I'm struggling with a basic concept that is used by DynamicData in ASP.NET or the DataForm in Silverlight. I do not have code since I'm still trying to understand the mechanism.

As far as I understand Attributes, the idea is to annotate the model by adding a RequiredAttribute to a property of a model class to indicate to the framework, that the property must always be filled.

I have many instances where it's OK for a property to be empty if the data is changed by an administrator, but it's not OK if a standard user changes the data.

Can this behaviour be expressed by an attribute?

On a similar note, the same question would apply to the ScaffoldColumn Attribute in order to hide confidential data from specific users.

Any help would be greatly appreciated.