For a full description on how to use the Access Control Component, see our robust guide here. This is merely an API guide on all the various aspects of the Access Control Component Mixin. Note that since this is most often used as a modal, all of the manipulation you are able to do is passed through as a model hash. Thus, you will notice, all the non-private properties described here are given the prefix model. because they should all be passed in using the hash for model, as described in the link above. Check "private" properties to see the documentation for the internal properties, which are not to be configured from the outside.

Show:
_defaultRule () Object private

Gets a rule with the default settings

Returns:

Object:

Rule

_isLastRuleOrLastUser () Boolean | String private

Method used to ensure that the last rule with edit is not removed (meaning no one could edit permissions). If there is a string it will be displayed as a notification.

Returns:

Boolean | String:

errorMessage

addMewRule () private

Task to add a new rule based on user selection (from both the dropdown and the Boolean Type checkboxes.

allChecked

Boolean private

Boolean to determine if all the Visible Boolean Types are checked (so that the button can be displayed as "Uncheck all")

allowedTypes

Array private

Internal array set by didReceiveAttrs showing the user types the current user is allowed to see/edit.

allowedTypes

Array private

Internal array set by didReceiveAttrs showing the departments the current user is allowed to see/edit.

allowedTypes

Object private

Computed object which contains all the boolean types with their names and descriptions (for the Permissions check boxes).

categorizedBooleans

Object private

Computed object which contains visibleBooleans by categories that as passed into model.typeCategories.

deptRules

Array private

Array of rules that have the userType of "dept". Will be empty if currentUser's role does not allow them to have access to the "dept" user type (see Access Control Permissions configuration, here).

editing

Boolean private

Computed Boolean to determine if the rule is an old rule being edited.

forceEdit

Boolean private


Default: false

groupRules

Array private

Array of rules that have the userType of "group". Will be empty if currentUser's role does not allow them to have access to the "group" user type (see Access Control Permissions configuration, here).

model.baseDesc

String

Description of base permission

model.disableLimitDept

Boolean

Don't show the limit dept. checkbox, even if a user is selected

model.hideTypes

Array

Any types in this array will be hidden in the modal

model.id

Unknown

Resource ID being edited

model.name

String

Name of the resource being edited

model.readOnly

Boolean

If true, cannot add new rules

model.resource

String

Resource type being edited

model.typeCategories

Array

Defines categories for types. If set, modal will display types under their respective categories, rather than all together. Format: [{name: "Category 1", types: [type1, type2]}, {name: "Category 2", types: [type3, type4]}] Make sure all all types are within a category; any type that is not in a category will not be shown. You can also put a type in multiple categories, which should work as expected although it hasn't been tested extensively.

model.typeDefaults

Array

Any types in this array will be checked by default

model.typeDependencies

Object

Defines types that depend on other types, so that those types will automatically be set Expected format (if parent type is set, each of the children types will be set automatically): {parentType: [childType1, childType2]}

model.typeDesc

Object

Object of type ID to custom display info icon

model.typeNames

Object

Object of type ID to custom display name

newRule

Object private

Rule being edited

noType

Boolean private

Computed Boolean which determines if there is no type selected of the newRule.

roleRules

Array private

Array of rules that have the userType of "role". Will be empty if currentUser's role does not allow them to have access to the "role" user type (see Access Control Permissions configuration, here). Note: currently roleRules are not fully implemented serverside, so this is currently turned off in all the apps.

selectedDept

Model private

Department model that is selected in the optional dropdown to filter search by.

showCurrentCheckbox

Boolean private

Computed Boolean to determine if the Limit Dept checkbox should be displayed.

userRules

Array private

Array of rules that have the userType of "user". Will be empty if currentUser's role does not allow them to have access to the "user" user type (see Access Control Permissions configuration, here).

visibleBooleans

Object private

Computed object which contains only those Boolean Types, which are not found in model.hideTypes.