Since Geneva UI16, the editor bar and large text box remain even when the variable is read-only. This is different than other versions, where the editor bar is hidden and the box is made smaller to only fit the text that is needed.
Steps to Reproduce
- Create a new catalog item.
- Create a variable for the catalog item:
- Type: HTML
- Question: HTML Box
- Name: my_html
- Default Value: Sample Text Here
- Create a Catalog UI policy:
- Applies to: A Catalog Item
- Short Description: Hide HTML
- Catalog Item: [Search for and select the item you created in step 1]
- Catalog Conditions:
Applies on a Catalog Item view | is | true
Applies on Catalog Tasks | is | true
Applies on Requested Items | is | true
- Save the form.
- In this Catalog UI policy, scroll to the Related Links section and create a new Catalog UI Policy Action:
- Variable Name: my_html
- Read only: True
- Go through the Service Catalog and try ordering the item.
Note that on the cat_item_view page, the box is made smaller, and the HTML editor is not showing.
- Repeat steps 1-5 on a Geneva instance (or export/import the Catalog Item, Variable, UI Policy, and UI Policy Action records).
Note that although the variable is read-only, you see a large text box and the HTML editor is displayed on the cat_item_view page.
This behaviour is by design. There are two methods for making an HTML variable read-only in Service Catalog:
- Have HTML field read-only (the editor controls are still visible, but disabled).
Use a UI Policy or Client Script on the html variable.
- Have HTML field read-only as a text area without editor control.
Update the WRITE ROLES and CREATE ROLES on HTML variable with a role like nobody or admin.
Related Problem: PRB653425