SmartClient Version: v13.1p_2025-08-08/AllModules Development Only (built 2025-08-08)
Hi, I think I’ve found an issue with using client-side Authentication in combination with the rule context. If you try this test case:
you’ll see that the button gets enabled both when selecting "CE" from the select (which is the role actually required in the enableWhen) and also when selecting only the "CEO" role.
It seems like it's matching based on a substring rather than checking for the actual presence of the string in the array.
Hi, I think I’ve found an issue with using client-side Authentication in combination with the rule context. If you try this test case:
Code:
isc.HLayout.create({ ID: "mainLayout", membersMargin: 15, members: [ isc.DynamicForm.create({ ID: "formRoles", fields: [ { name: "selectRoles", title: "Roles", editorType: "SelectItem", multiple: true, valueMap: { "CE": "CE", "CEO": "CEO" }, changed: function (form, item, value) { isc.Authentication.setRoles(value); mainLayout.addMember(isc.IButton.create({ ID: "testButton", width: 200, enableWhen: {fieldName: "auth.roles", operator: "contains", value: "CE"} })); testButton.setTitle(value) } }] }) ] });
It seems like it's matching based on a substring rather than checking for the actual presence of the string in the array.
Comment