Allows dynamically to apply permissions for the specific role or user on CI level. It helps to admin user to see what user or role can do in the system.
Methods
# static cancel()
Rejects all pending changes and closes popup.
Properties:
Name | Type | Description |
---|---|---|
type |
string | CANCEL |
# static changePristineState(pristine)
Changes the pristinity state of opened "View as" popup. Visually it is represented by asterisk on the title of modal dialog. If pristinity is false and user clicks on "Cancel", first confirmation will be asked before changes be lost.
Parameters:
Name | Type | Description |
---|---|---|
pristine |
boolean | the new pristinity value |
Properties:
Name | Type | Description |
---|---|---|
type |
string | CHANGE_PRISTINE_STATE |
# static clear()
Removes selected role or user. What means that no permissions filtering happens anymore on CI level.
Properties:
Name | Type | Description |
---|---|---|
type |
string | CLEAR |
# static close()
Closes view as popup, changes pristinity to true. There is no check performed before closing popup whether user has pending changes or not. Use {cancel} for that.
Properties:
Name | Type | Description |
---|---|---|
type |
string | CLOSE |
# static refresh(data)
Applies permissions on CIs based on selected user/roles.
Parameters:
Name | Type | Description |
---|---|---|
data |
object | Object which contains selected user or roles. Represented as {user, roles}, where user is string and roles - array of strings. Only one of fields should be defined. |
Properties:
Name | Type | Description |
---|---|---|
type |
string | REFRESH |
# static setData(data)
Saves selected user or roles.
Parameters:
Name | Type | Description |
---|---|---|
data |
object | Object which contains selected user or roles. Represented as {user, roles}, where user is string and roles - array of strings. |
Properties:
Name | Type | Description |
---|---|---|
type |
string | SET_DATA |
# static stageData(data)
Saves typed in user's information in "View as" modal dialog but which is not saved yet.
Parameters:
Name | Type | Description |
---|---|---|
data |
object | Object which contains selected user or roles. Represented as {user, roles}, where user is string and roles - array of strings. |
Properties:
Name | Type | Description |
---|---|---|
type |
string | SET_STAGED_DATA |