I am new to LINQ and have read through several posts here and trying to figure out how to extract the role of the current user through the ContentManager. I want to do this so that I can pass it to the view and set some things in the UI based on the
role the user has. i.e. I need to limit access for an Instructor role (which is a role specific to this implementation).
So far I have managed to get to the IContentManager and IOrchardServices, and am able to get a list of users with this code (which I pulled from
this post). How can I extract the user role from users below? Or is there a different/better way of handling this?
var userQuery = _orchardServices.ContentManager.Query().ForType("User");
var users = userQuery.List();
Perhaps I can pull it directly from the IOrchardServices instance? I am currently getting the Id like this: