ORM Metadata - AuthorizationAttribute

4 posts, 0 answers
  1. Rob
    Rob avatar
    2 posts
    Member since:
    Jan 2011

    Posted 08 Mar 2013 Link to this post

    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.
  2. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 11 Mar 2013 Link to this post

    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.
  3. DevCraft banner
  4. Rob
    Rob avatar
    2 posts
    Member since:
    Jan 2011

    Posted 11 Mar 2013 Link to this post

    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.
  5. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 11 Mar 2013 Link to this post

    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.
Back to Top