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)

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 Optional Description
roleIds No

Array of roles which the current user should have.

mo No

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

Returns : {}
Protected Async checkIfOwner
checkIfOwner(mo)
Decorators :
@memoize(undefined)
Parameters :
Name Optional
mo No
Returns : {}
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

result-matching ""

    No results matching ""