Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Security

Index

Constructors

constructor

  • new Security(jmixREST: JmixRestConnection): Security

Properties

attrPermissionCache

attrPermissionCache: ObservableMap<string, EntityAttrPermissionValue> = ...

Private effectivePermissions

effectivePermissions: null | EffectivePermsInfo = null

permissionsRequestCount

permissionsRequestCount: number = 0

Accessors

isDataLoaded

  • get isDataLoaded(): boolean
  • Indicates whether the permissions data has been successfully loaded from backend. NOTE: will always return true if the REST API version doesn't support effective permissions (REST API version < 7.2).

    Returns boolean

permissions

  • get permissions(): EffectivePermsInfo

Methods

canDownloadFiles

  • canDownloadFiles(): boolean
  • Returns a boolean indicating whether the current user is allowed to download files.

    Returns boolean

canUploadFiles

  • canUploadFiles(): boolean
  • Returns a boolean indicating whether the current user is allowed to upload files.

    Returns boolean

getAttributePermission

  • getAttributePermission(entityName: string, attributeName: string): EntityAttrPermissionValue
  • Parameters

    • entityName: string
    • attributeName: string

    Returns EntityAttrPermissionValue

isAttributePermissionGranted

  • isAttributePermissionGranted(entityName: string, attrName: string, requiredAttrPerm: "VIEW" | "MODIFY"): boolean
  • Returns a boolean indicating whether a given entity attribute permission is granted to the current user.

    Parameters

    • entityName: string
    • attrName: string
    • requiredAttrPerm: "VIEW" | "MODIFY"

    Returns boolean

isOperationPermissionGranted

  • isOperationPermissionGranted(entityName: string, operation: EntityOperationType): boolean
  • Returns a boolean indicating whether a given entity operation permission is granted to the current user.

    Parameters

    • entityName: string
    • operation: EntityOperationType

    Returns boolean

isSpecificPermissionGranted

  • isSpecificPermissionGranted(target: string): boolean

loadPermissions

  • loadPermissions(): Promise<void>

Generated using TypeDoc