This is a migrated thread and some comments may be shown as answers.

ORM Metadata - AuthorizationAttribute

3 Answers 53 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 2
Rob asked on 08 Mar 2013, 12:01 PM
I've been working through the OpenAccess "How to: Add Metadata Class" samples and I can successfully apply attributes to entities.  I've created a simple Silverlight WCF/RIA app with asp.net membership and now I want to apply some AuthorizationAttributes (RequiresRole, RequiresAuthentication etc) to my auto generated domain operations.

However I don't see how I can do this other than by applying the attributes directly in the generated domain service cs file. 
Are there any downloadable samples for applying authorization attributes to domain operations or how should I go about doing this?

Many thanks.

Rgds,

Rob.

3 Answers, 1 is accepted

Sort by
0
Boris Georgiev
Telerik team
answered on 11 Mar 2013, 11:55 AM
Hello Rob,

Unfortunately at the moment this is the only way to add Authorization Attributes - manually in the generated domain service cs file. We would only recommend you after you generate the service class, to remove the template which generates the service cs file to protect from possible regeneration that could wipe out your changes.

As the definition of attributes in the RIA services in the RIA wizard is a valid feature request, you can also post a request to our Ideas and Feedback portal so there would be an easy way to add Authorization Attributes as part of the code generation.

Do not hesitate to get back to us if you have any other questions.
 
Regards,
Boris Georgiev
the Telerik team
OpenAccess ORM Q1 2013 is out featuring Multi-Diagrams, Persistent Data Stream Support and much more. Check out all of the latest highlights.
0
Rob
Top achievements
Rank 2
answered on 11 Mar 2013, 12:38 PM
Boris,
Thanks very much.  At least I know what I can do to work around this.  I'll definitely raise a feature request for this :)

Rgds,

Rob.
0
Boris Georgiev
Telerik team
answered on 11 Mar 2013, 01:24 PM
Hi Rob,

Thanks for the feature request. Do not hesitate to vote for it as well, you can do it once. More votes will push it with a higher priority in our backlog.


Kind regards,
Boris Georgiev
the Telerik team
OpenAccess ORM Q1 2013 is out featuring Multi-Diagrams, Persistent Data Stream Support and much more. Check out all of the latest highlights.
Tags
Getting Started
Asked by
Rob
Top achievements
Rank 2
Answers by
Boris Georgiev
Telerik team
Rob
Top achievements
Rank 2
Share this question
or