Methods
(async) addAccessLevel(passedAccessLevel) → {Object}
This method adds the given access level object and syncs it with both the user and club document. It pushes the id to clubAcess of User document and memberAcess of Club document
Parameters:
Name | Type | Description |
---|---|---|
passedAccessLevel |
Object | input access level object |
Returns:
created access level object
- Type
- Object
(async) deleteAccessLevel(id) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
id |
Object | id of the access level object to be deleted |
Returns:
deleted access level object
- Type
- Object
(async) deleteAccessLevelFromUser(id) → {Object}
This is called when deleting a club or any particular instance where the accesslevels from the clubs need not be deleted, as the entire club is going to be deleted
Parameters:
Name | Type | Description |
---|---|---|
id |
Object | id of the access level object to be deleted |
Returns:
deleted access level object
- Type
- Object
resolveAccess(accessArray) → {Array}
Returns an array of resolved Access Levels
Parameters:
Name | Type | Description |
---|---|---|
accessArray |
Array | array of ids to be resolved |
Returns:
array of resolved access level objects
- Type
- Array
(async) updateAccessLevel(passedAccessLevel) → {Object}
Parameters:
Name | Type | Description |
---|---|---|
passedAccessLevel |
Object | input access level object |
Returns:
updated access level object
- Type
- Object