Skip to main content
Skip table of contents

Role Dimensions Widgets

Definition

Two Widgets allow to edit and display Dimensions on a Role.

Role Dimensions Edit

Role Dimensions Display

Tips

To access the Role Dimensions Edit Widget or Role Dimensions Display Widget, you must configure the Widget on a Feature with an object kind sets to ROLE.

Each dimension can be translated with these I18N keys:

  • ui.model.dimensions.<dimensionId>.name (in this case, all dimensions with the same id will be translated on all roles using it).

  • ui.model.roles.<roleId>.dimensions.<dimensionId>.name (in this case, only the dimension on a specific role will be translated).

Use

When the Role Dimensions Edit Widget is configured in an update feature, you can add, update or delete (if and only if ...) a dimension to a Role.

When the Role Dimensions Display Widget is configured in a read feature, you can view a dimension to a Role.

Create and update Role Dimensions

You can add a dimension to a Role by clicking on the "Add Dimension" button.

You can update a configured dimension to a Role by clicking on the "Edit" button. 

On each case, a pop-up opens with a form which allows to configure a dimension.

Property name

Type

Mandatory

Description

Values (default value in bold)

Key

String

YES

The unique key of each dimension.

-

Tags

Enum

NO

Allows to define tag(s) on each dimension.
These tags will be reused on the configuration of a Role Request Policy and Role Request Widget to manage dimensions (editable or not).

-

Display as Detail

Boolean

NO

Allows to define if the dimension should be displayed in the Role Dashboard.

ON, OFF

For Manual Provisioning

Boolean

NO

Allows to define if the dimension is required as manual provisioning.

ON, OFF

Order

Integer

NO

Indicates the display order of dimensions (on Role Assignment Widget for example).
If two dimensions have the same priority, a random display is executed.

0

Value Type

Enum

YES

The type of the dimension.

string, boolean, float, integer, identity, organization, resource, role, role publication

Scope

-

NO

Displays only if the value type is identity, organization, resource, role or role publication. Allows to limit search results.

-

Multi-valued

Boolean

NO

Indicates if the dimension can have several values.

ON, OFF

Mandatory

Boolean

NO

Indicates if the dimension is mandatory when assigning the Role.

ON, OFF

Initialization Rule

Rule

NO

Allows to define a dimension value, which will be displayed when the requester accesses the role assignment.

Example of groovy script:

CODE
if (OBJECT.country =="France"){
    return true
}
else {return false}

Display Conditions

-

NO

Allows to define when the dimension will be displayed or not.

Available contexts:

  • OBJECT.

  • DIMENSION.

  • OPERATION.

Example of groovy script:

CODE
if (OBJECT.id =="AALCV565"){
    return true
}
else {return false}

Choices Rule

Rule

NO

Allows to create a choices list to define the value of the dimension by using:

  • Reference Table

  • Resource Type

  • Groovy Script

Only if the value type = STRING

Example of groovy script:

CODE
return ChoicesRuleResult.of("ui.model.attributes.scopedright.values", ["adm.manager", "adm.directory", "adm.owner", "adm.boolean", "adm.string", "adm.float", "adm.role-owner"])
GROOVY
return ChoicesRuleResult.ofFixed("my.i18n.key.label", 
[value1: [label_fr: "texte français", label_en: "english text", boolean_value: true, number_value: 1, instant_value: Instant.now()], 
value2: [label_fr: "texte2 français", label_en: "english text2", boolean_value: true, number_value: 2, instant_value: Instant.now()]
]) 

(info) With the 2nd syntax, the following parameters will be available in the translations

  • value => automatically created and valued at the value of the choice

  • All provided i18n params (label_fr, label_en, number_value….)

  • All provided i18n params prefixed by __has_ (automatically created and valued at true)

Normalize Rule

Rule

NO

Allows to normalize data and therefore to modify the entered value of the dimension if it does not correspond to the rule.

It is possible to configure several normalize rules.

-

Validation Rule

Rule

NO

Allows to create a validation rule for the value of the dimension and to associate an error message.
It is possible to configure several validation rules.

Example of groovy script:

CODE
Integer value = (Integer) VALUE
if (value <4) {
    return ValidationRuleResult.valid()
}
else {
return ValidationRuleResult.invalid(
"the value must be lower or equals 3")}

Delete Role Dimensions

You can delete a configured dimension to a Role by clicking on the "Delete" button.

Read Role Dimensions

You can consult a configured dimension to a Role by clicking on the "View" button.

Configuration

Properties

No specific properties to configure this Widget.

Example

Edit

Display

CODE
<widget id="roleDimensions" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
	<config>
		<editor>
			<editWidget xsi:type="ctdbum:RoleDimensionsEditWidgetType">
				<hidden>false</hidden>
				<config/>
			</editWidget>
		</editor>
		<label></label>
		<lockedInUi>false</lockedInUi>
		<mode>READ_WRITE</mode>
		<multiValued>true</multiValued>
		<override>true</override>
	</config>
	<attributeId>dimensions</attributeId>
</widget>
CODE
<widget id="roleDimensions" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
	<config>
		<editor>
			<displayWidget xsi:type="ctdbum:RoleDimensionsDisplayWidgetType">
				<hidden>false</hidden>
				<config/>
			</displayWidget>
		</editor>
		<label></label>
		<lockedInUi>false</lockedInUi>
		<mode>READ</mode>
		<multiValued>true</multiValued>
		<override>true</override>
	</config>
	<attributeId>dimensions</attributeId>
</widget>

Read Next

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.