Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

block some property when $expand

$
0
0

hi all ,

simple question, my project have a simple Role based access control (RBAC), so i don want everyone can easy to $expand resource.

but as i known, Web API can only set 

[EnableQuery(AllowedQueryOptions = AllowedQueryOptions.Expand , MaxExpansionDepth=2)]

can totally not allow "$expand" or limit the Depth 

is it possible to set limit for properties (if can base on role, that's will be better)? 

something look like 

[EnableQuery(AllowedQueryOptions = AllowedQueryOptions.Expand , propertiesNotAbleExpand="some property not albe to $expand")]

Regards,

Yam


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>