Skip to content

Latest commit

 

History

History
107 lines (63 loc) · 3.17 KB

security.rst

File metadata and controls

107 lines (63 loc) · 3.17 KB

Security

Note

This is a draft version of the documentation, it is not yet complete. Feel free to contribute to it via GitHub.

The Security API allows you to work with permissions, both Omnia permissions and SharePoint permissions.

You can for example check if the current user has a certain permission on a web, or a certain role in Omnia.

You reach the Security API through the following service

The API contains the following methods:

AddOrUpdateOmniaPermissionRoles #######

Documentation in progress

DeleteOmniaPermissionRolesForExtensionPackage #######

Documentation in progress

DoesUserHavePermissionOnWeb #######

Use this method to check if the user has the specified permission on the current web.

Returns true if the user has the supplied permissionKind, otherwise false.

GetAllOmniaPermissionRoles #######

Use this method to get all available Omnia Permission roles for a given URL.

Returns an array of PermissionRole for the given targetUrl.

GetCurrentUserADGroups #######

If you need to get all AD groups the current user is a member of, use the following end-point.

Note

Only AD groups used somewhere in Omnia Foundation will be returned, e.x. groups used for security in Omnia Administration or as part of targeting definitions.

If you supply and empty groups parameter, you will get all AD groups, used somewhere in Omnia, that the user is a member of.

To only check specific AD groups, pass their names in the groups parameter

GetPermissionRoles #######

To get Permissions Roles for given Permission Role Definitions you can use the following method, passing in a List<PermissionRoleDefinition> containing the role definitions of interest.

This will return an array containing all permissions roles existing for the supplied definitions.

IsUserAuthorized #######

Use this method to check if the user is authorized, e.g. is a member of the required Omnia PermissionRoleDefinition

Returns true if the user is a member of the required Omnia role, else false.

SearchOmniaPermissionRoles #######

Documentation in progress