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.
Properties
- allChecked
- allowedTypes
- allowedTypes
- allowedTypes
- categorizedBooleans
- deptRules
- editing
- forceEdit
- groupRules
- model.baseDesc
- model.disableLimitDept
- model.hideTypes
- model.id
- model.name
- model.readOnly
- model.resource
- model.typeCategories
- model.typeDefaults
- model.typeDependencies
- model.typeDesc
- model.typeNames
- newRule
- noType
- roleRules
- selectedDept
- showCurrentCheckbox
- userRules
- visibleBooleans
allChecked
Boolean privateBoolean to determine if all the Visible Boolean Types are checked (so that the button can be displayed as "Uncheck all")
allowedTypes
Array privateInternal array set by didReceiveAttrs
showing the user types the current user is allowed to see/edit.
allowedTypes
Array privateInternal array set by didReceiveAttrs
showing the departments the current user is allowed to see/edit.
allowedTypes
Object privateComputed object which contains all the boolean types with their names and descriptions (for the Permissions check boxes).
categorizedBooleans
Object privateComputed object which contains visibleBooleans by categories that as passed into model.typeCategories
.
deptRules
Array privateArray 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).
groupRules
Array privateArray 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.typeCategories
ArrayDefines 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.typeDependencies
ObjectDefines 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]}
noType
Boolean privateComputed Boolean which determines if there is no type selected of the newRule.
roleRules
Array privateArray 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 privateDepartment model that is selected in the optional dropdown to filter search by.
showCurrentCheckbox
Boolean privateComputed Boolean to determine if the Limit Dept checkbox should be displayed.
userRules
Array privateArray 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 privateComputed object which contains only those Boolean Types, which are not found in model.hideTypes
.