Please help us by completing this surveyGo to survey
sensenet has a flexible Permission System for controlling the accessibility of content on different levels. You are able to set permissions (allow or deny) for individual users or groups, for individual documents or whole libraries and workspaces. To be able to visualize the permission settings we created a C# and OData REST API for querying the settings that developers and portal builders can use in custom solutions.
This article contains information for developers and portal builders about the sensenet API for querying permission setting in a subtree.
To use this API the logged in user must have subtree SeePermission permission on the root content.
The API has a native C# implementation and a Rest API counterpart. The methods are the same, only the parameter types are different to make it more convenient for the actual use case. The C# API class name is: PermissionQuery in the SenseNet.ContentRepository.Security namespace. The C# methods and OData operations can be found below in this article.
Please note that the current permission query API is very specific to certain permission queries. In the future there will be a lot more flexible API based on LINQ for developers to query security information directly from inner structures. Until then please take a look at the original Permission queries wiki article for diagrams and examples on the old API.
Using this API developers can display a complex structure that represents the permission settings in a subtree. The displayed structure depends on the concept that you choose. There are two concepts that are determined by the parameter explicitOnly:
Currently only the explicit list concept is implemented.
To see the currently available methods and responses along with sample diagrams, please head over to the original Permission queries wiki article.
A new security query api is coming soon.
Is something missing? See something that needs fixing? Propose a change here.