File

core/common/permissions.service.ts

Index

Methods

Constructor

constructor(appState: AppStateService, inventory: InventoryService, user: UserService)
Parameters :
Name Type Optional
appState AppStateService No
inventory InventoryService No
user UserService No

Methods

canEdit
canEdit(roleIds, mo: IManagedObject | IIdentified)

Checks if the current user has write permissions for the given mo. (either through global role, individual device permissions or via inventory roles).

Parameters :
Name Type Optional Description
roleIds No

Array of roles which the current user should have.

mo IManagedObject | IIdentified No

The managed object for which we are checking whether the user has access.

Returns : unknown
Protected Async checkIfOwner
checkIfOwner(mo)
Decorators :
@memoize(undefined)
Parameters :
Name Optional
mo No
Returns : unknown
Protected checkWithRequest
checkWithRequest(mo)
Decorators :
@memoize(undefined)
Parameters :
Name Optional
mo No
Returns : any
hasAllRoles
hasAllRoles(roleIds: string[])
Parameters :
Name Type Optional
roleIds string[] No
Returns : any
hasAnyRole
hasAnyRole(roleIds: string[])
Parameters :
Name Type Optional
roleIds string[] No
Returns : any
hasRole
hasRole(roleId: string)
Parameters :
Name Type Optional
roleId string No
Returns : any

results matching ""

    No results matching ""