Retrieving nodes based on role protection in a Umbraco API controller
I created an ArticleController that inherits from UmbracoApiController where i return every article in my solution.
I would like to return the articles accessible to the current member using Role Protection and this controller:
[HttpGet]
public HttpResponseMessage Get() {
var root = Umbraco.TypedContentAtRoot();
var nodes = root.Descendants("Articles");
//We need to check the role protection of each node agains current members member groups
var accessibleArticles = new List<Article>();
return Request.CreateResponse(HttpStatusCode.OK, accessibleArticles );
}
Retrieving nodes based on role protection in a Umbraco API controller
I created an ArticleController that inherits from UmbracoApiController where i return every article in my solution.
I would like to return the articles accessible to the current member using Role Protection and this controller:
The solution is running on Umbraco 7.2.8.
It looks like there have been some changes to the UmbracoHelper library ref: https://github.com/umbraco/Umbraco-CMS/blob/775e63148d9c9e0ba4ffad3b697f6f2e2ca9f28b/src/Umbraco.Web/UmbracoHelper.cs#L428.
Has anyone used this function in the Umbraco Api Controller context?
Any tips on how to achieve this is much appreciated!
is working on a reply...