Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Security

Index

Constructors

constructor

  • new Security(cubaREST: CubaApp): Security

Properties

attrPermissionCache

attrPermissionCache: ObservableMap<string, EntityAttrPermissionValue> = new ObservableMap()

Private cubaREST

cubaREST: CubaApp

Private Optional effectivePermissions

effectivePermissions: EffectivePermsInfo

permissionsRequestCount

permissionsRequestCount: number = 0

Private restSupportEffectivePerms

restSupportEffectivePerms: boolean = true

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

canUploadAndLinkFile

  • canUploadAndLinkFile(): boolean
  • Returns a boolean indicating whether the current user is allowed to upload files. This is convenience method that checks whether a user has a create operation permission on sys$FileDescriptor entity and cuba.restApi.fileUpload.enabled specific permission.

    Returns boolean

getAttributePermission

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

    • entityName: string
    • attributeName: string

    Returns EntityAttrPermissionValue

isAttributePermissionGranted

  • isAttributePermissionGranted(entityName: string, attrName: string, requiredAttrPerm: Exclude<EntityAttrPermissionValue, "DENY">): boolean
  • Returns a boolean indicating whether a given entity attribute permission is granted to the current user.

    Parameters

    • entityName: string
    • attrName: string
    • requiredAttrPerm: Exclude<EntityAttrPermissionValue, "DENY">

    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
  • Returns a boolean indicating whether a given specific permission is granted to the current user.

    Parameters

    • target: string

    Returns boolean

loadPermissions

  • loadPermissions(): Promise<void>

Generated using TypeDoc