Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Security

Class that contains shortcuts for security-related custom content actions

Hierarchy

  • Security

Index

Constructors

constructor

Properties

Private repository

repository: Repository

Methods

addMembers

  • addMembers(contentIdOrPath: string | number, contentIds: number[]): Promise<void>
  • Administrators can add new members to a group using this action. The list of new members can be provided using the 'contentIds' parameter (list of user or group ids).

    Parameters

    • contentIdOrPath: string | number

      A Path or Id to the content to check

    • contentIds: number[]

      List of the member ids.

    Returns Promise<void>

    A Promise with the response object

getAllPermissions

  • Gets all permissions for the requested content. Required permissions to call this action: See permissions.

    Parameters

    • contentIdOrPath: string | number

      The path or id for the content

    Returns Promise<PermissionResponseModel>

    A promise with the permission response

getAllowedUsers

  • Returns a content collection that represents users who have enough permissions to a requested resource. The permissions effect on the user and through direct or indirect group membership too. The function parameter is a permission name list that must contain at least one item.

    Type parameters

    • TUser: User

    Parameters

    Returns Promise<ODataCollectionResponse<TUser>>

    Returns an RxJS observable that you can subscribe of in your code.

getParentGroups

  • Returns a content collection that represents groups where the given user or group is member directly or indirectly. This function can be used only on a resource content that is Group or User or any inherited type. If the value of the "directOnly" parameter is false, all indirect members are listed.

    Type parameters

    • TGroup: Group

    Parameters

    Returns Promise<ODataCollectionResponse<TGroup>>

    A promise with the response

getPermissionsForIdentity

  • getPermissionsForIdentity(contentIdOrPath: string | number, identityPath: string): Promise<PermissionEntry>
  • Gets all permissions for the requested content. Required permissions to call this action: See permissions.

    Parameters

    • contentIdOrPath: string | number

      The path or id for the content

    • identityPath: string

    Returns Promise<PermissionEntry>

    A promise with the permission response

getRelatedIdentities

  • Identity list that contains every users/groups/organizational units that have any permission setting (according to permission level) in the subtree of the context content.

    Type parameters

    • TIdentityType: User | Group

    Parameters

    Returns Promise<ODataCollectionResponse<TIdentityType>>

    A promise that will be resolved with a collection of related identities

getRelatedIdentitiesByPermissions

  • This structure is designed for getting tree of content that are permitted or denied for groups/organizational units in the selected subtree. The result content are not in a paged list: they are organized in a tree.

    Type parameters

    • TIdentity: User | Group

    Parameters

    Returns Promise<ODataCollectionResponse<TIdentity>>

    Returns an RxJS observable that you can subscribe of in your code.

getRelatedItems

getRelatedItemsOneLevel

  • This structure is designed for getting tree of content that are permitted or denied for groups/organizational units in the selected subtree. The result content are not in a paged list: they are organized in a tree.

    Type parameters

    Parameters

    Returns Promise<ODataCollectionResponse<TItem>>

    Returns an RxJS observable that you can subscribe of in your code.

getRelatedPermissions

  • Permission list of the selected identity with the count of related content. 0 indicates that this permission has no related content so the GUI does not have to display it as a tree node

    Type parameters

    • TMemberType: User | Group

    Parameters

    Returns Promise<ODataCollectionResponse<TMemberType>>

    A promise with the related users / groups

hasPermission

  • hasPermission(contentIdOrPath: string | number, permissions: Array<"See" | "Preview" | "PreviewWithoutWatermark" | "PreviewWithoutRedaction" | "Open" | "OpenMinor" | "Save" | "Publish" | "ForceCheckin" | "AddNew" | "Approve" | "Delete" | "RecallOldVersion" | "DeleteOldVersion" | "SeePermissions" | "SetPermissions" | "RunApplication" | "ManageListsAndWorkspaces" | "TakeOwnership" | "Custom01" | "Custom02" | "Custom03" | "Custom04" | "Custom05" | "Custom06" | "Custom07" | "Custom08" | "Custom09" | "Custom10" | "Custom11" | "Custom12" | "Custom13" | "Custom14" | "Custom15" | "Custom16" | "Custom17" | "Custom18" | "Custom19" | "Custom20" | "Custom21" | "Custom22" | "Custom23" | "Custom24" | "Custom25" | "Custom26" | "Custom27" | "Custom28" | "Custom29" | "Custom30" | "Custom31" | "Custom32">, identityPath?: undefined | string): Promise<boolean>
  • Gets if the given user has the specified permissions for the requested content.

    Required permissions to call this action: See permissions.

    Parameters

    • contentIdOrPath: string | number
    • permissions: Array<"See" | "Preview" | "PreviewWithoutWatermark" | "PreviewWithoutRedaction" | "Open" | "OpenMinor" | "Save" | "Publish" | "ForceCheckin" | "AddNew" | "Approve" | "Delete" | "RecallOldVersion" | "DeleteOldVersion" | "SeePermissions" | "SetPermissions" | "RunApplication" | "ManageListsAndWorkspaces" | "TakeOwnership" | "Custom01" | "Custom02" | "Custom03" | "Custom04" | "Custom05" | "Custom06" | "Custom07" | "Custom08" | "Custom09" | "Custom10" | "Custom11" | "Custom12" | "Custom13" | "Custom14" | "Custom15" | "Custom16" | "Custom17" | "Custom18" | "Custom19" | "Custom20" | "Custom21" | "Custom22" | "Custom23" | "Custom24" | "Custom25" | "Custom26" | "Custom27" | "Custom28" | "Custom29" | "Custom30" | "Custom31" | "Custom32">

      list of permission names (e.g. Open, Save)

    • Optional identityPath: undefined | string

    Returns Promise<boolean>

    A promise with the response value

removeMembers

  • removeMembers(contentIdOrPath: string | number, contentIds: number[]): Promise<void>
  • Administrators can remove members from a group using this action. The list of removable members can be provided using the 'contentIds' parameter (list of user or group ids).

    Parameters

    • contentIdOrPath: string | number

      A Path or Id to the content to check

    • contentIds: number[]

      List of the member ids.

    Returns Promise<void>

    Returns an RxJS observable that you can subscribe of in your code.

setPermissionInheritance

  • setPermissionInheritance(idOrPath: string | number, inheritance: Inheritance): Promise<void>
  • Sets permission inheritance on the requested content.

    Parameters

    • idOrPath: string | number

      A content id or path

    • inheritance: Inheritance

      inheritance: break or unbreak

    Returns Promise<void>

    A promise with a response model

setPermissions

  • setPermissions(idOrPath: string | number, permissionRequestBody: PermissionRequestBody): Promise<void>
  • Sets permissions on the requested content. You can add or remove permissions for one ore more users or groups using this action.

    Parameters

    • idOrPath: string | number

      A content id or path

    • permissionRequestBody: PermissionRequestBody

      inheritance: break or unbreak

    Returns Promise<void>

    A promise with a response model

Generated using TypeDoc