@openiap/nodeapi / Exports / Base
Class: Base
Table of contents
Constructors
Properties
- _acl
- _created
- _createdby
- _createdbyid
- _encrypt
- _id
- _modified
- _modifiedby
- _modifiedbyid
- _name
- _type
- _version
- name
Methods
Constructors
constructor
• new Base()
Defined in
Properties
_acl
• _acl: Ace
[] = []
Defined in
_created
• _created: Date
Defined in
_createdby
• _createdby: string
Defined in
_createdbyid
• _createdbyid: string
Defined in
_encrypt
• _encrypt: string
[] = []
Defined in
_id
• _id: string
Defined in
_modified
• _modified: Date
Defined in
_modifiedby
• _modifiedby: string
Defined in
_modifiedbyid
• _modifiedbyid: string
Defined in
_name
• _name: string
Defined in
_type
• _type: string
= 'unknown'
Defined in
_version
• _version: number
= 0
Defined in
name
• name: string
Defined in
Methods
addRight
▸ Static
addRight(item
, _id
, name
, rights
, deny?
): void
Add/update right for user/role
Parameters
Name | Type | Default value | Description |
---|---|---|---|
item | Base | undefined | - |
_id | string | undefined | user/role id |
name | string | undefined | Displayname for user/role |
rights | number [] | undefined | Right to set |
deny | boolean | false | Deny the right |
Returns
void
void
Defined in
assign
▸ Static
assign<T
>(source
): T
Create new instance of object, using values from input object
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
source | T |
Returns
T
T New object as Type
Defined in
getRight
▸ Static
getRight(item
, _id
, deny?
): Ace
Enumerate ACL for specefic ID
Parameters
Name | Type | Default value | Description |
---|---|---|---|
item | Base | undefined | - |
_id | string | undefined | Id to search for |
deny | boolean | false | look for deny or allow permission |
Returns
Ace Ace if found, else null
Defined in
hasRight
▸ Static
hasRight(item
, _id
, bit
, deny?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
item | Base | undefined |
_id | string | undefined |
bit | number | undefined |
deny | boolean | false |
Returns
boolean
Defined in
removeRight
▸ Static
removeRight(item
, _id
, rights?
, deny?
): void
Remove a right from user/role
Parameters
Name | Type | Default value | Description |
---|---|---|---|
item | Base | undefined | - |
_id | string | undefined | user/role id |
rights | number [] | null | Right to revoke |
deny | boolean | false | Deny right |
Returns
void
void
Defined in
setRight
▸ Static
setRight(item
, x
): void
Set right for specefic id, if exists
Parameters
Returns
void
void