ACL
Access Control List
It describes the read and write permission of a record to public, specific roles or users.
Static Method Summary
| Static Public Methods | ||
| public static |
Constructs a new ACL object from JSON object. |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(attrs: Object[]) Constructs a new ACL object. |
|
Method Summary
| Public Methods | ||
| public |
hasPublicReadAccess(): Boolean Checks if public has read access. |
|
| public |
hasPublicWriteAccess(): Boolean Checks if public has write access. |
|
| public |
hasReadAccess(user: Record, roles: Role[]): Boolean Checks if the specific user and role has read access. |
|
| public |
hasReadAccessForRole(role: Role): Boolean Checks if the specific role has read access. |
|
| public |
hasReadAccessForUser(user: Record): Boolean Checks if the specific user has read access. |
|
| public |
hasWriteAccess(user: Record, roles: Role[]): Boolean Checks if the specific user and role has write access. |
|
| public |
hasWriteAccessForRole(role: Role): Boolean Checks if the specific role has write access. |
|
| public |
hasWriteAccessForUser(user: Record): Boolean Checks if the specific user has write access. |
|
| public |
setNoAccessForRole(role: Role) Sets a specific role to have no access. |
|
| public |
setNoAccessForUser(user: Record) Sets a specific user to have no access. |
|
| public |
Sets public to have no access. |
|
| public |
Sets public to have read access only. |
|
| public |
Sets public to have both read and write access. |
|
| public |
setReadOnlyForRole(role: Role) Sets a specific role to have read access only. |
|
| public |
setReadOnlyForUser(user: Record) Sets a specific user to have read access only. |
|
| public |
setReadWriteAccessForRole(role: Role) Sets a specific role to have read and write access. |
|
| public |
setReadWriteAccessForUser(user: Record) Sets a specific user to have read and write access. |
|
| public |
toJSON(): * Serializes ACL to a JSON object. |
|
Static Public Methods
Public Constructors
public constructor(attrs: Object[]) source
Constructs a new ACL object.
Params:
| Name | Type | Attribute | Description |
| attrs | Object[] |
Public Methods
public hasPublicReadAccess(): Boolean source
Checks if public has read access.
Return:
| Boolean | true if public has read access |
public hasPublicWriteAccess(): Boolean source
Checks if public has write access.
Return:
| Boolean | true if public has write access |
public hasReadAccess(user: Record, roles: Role[]): Boolean source
Checks if the specific user and role has read access.
Return:
| Boolean | true if the user and roles has read access |
public hasReadAccessForRole(role: Role): Boolean source
Checks if the specific role has read access.
Params:
| Name | Type | Attribute | Description |
| role | Role | the role |
Return:
| Boolean | true if the role has read access |
public hasReadAccessForUser(user: Record): Boolean source
Checks if the specific user has read access.
Params:
| Name | Type | Attribute | Description |
| user | Record | the user |
Return:
| Boolean | true if the user has read access |
public hasWriteAccess(user: Record, roles: Role[]): Boolean source
Checks if the specific user and role has write access.
Return:
| Boolean | true if the user and roles has write access |
public hasWriteAccessForRole(role: Role): Boolean source
Checks if the specific role has write access.
Params:
| Name | Type | Attribute | Description |
| role | Role | the role |
Return:
| Boolean | true if the role has write access |
public hasWriteAccessForUser(user: Record): Boolean source
Checks if the specific user has write access.
Params:
| Name | Type | Attribute | Description |
| user | Record | the user |
Return:
| Boolean | true if the user has write access |
public setNoAccessForRole(role: Role) source
Sets a specific role to have no access.
Params:
| Name | Type | Attribute | Description |
| role | Role | the role |
public setNoAccessForUser(user: Record) source
Sets a specific user to have no access.
Params:
| Name | Type | Attribute | Description |
| user | Record | the user record |
public setReadOnlyForRole(role: Role) source
Sets a specific role to have read access only.
Params:
| Name | Type | Attribute | Description |
| role | Role | the role |
public setReadOnlyForUser(user: Record) source
Sets a specific user to have read access only.
Params:
| Name | Type | Attribute | Description |
| user | Record | the user record |
public setReadWriteAccessForRole(role: Role) source
Sets a specific role to have read and write access.
Params:
| Name | Type | Attribute | Description |
| role | Role | the role |
