F hide properties
Loading
For https://gitlab.indiscale.com/caosdb/customers/leibniz-zmt/management/-/issues/130. Allows to hide properties for certain users/roles.
A few new HTML classes have been introduced to hide/show properties and allow for changing css styling depending on properties being hidden or not.
Please check carefully:
Start a caosdb-server and caosdb-webui with a valid ext_prop_display.json
config file and BUILD_MODULE_EXT_PROPERTY_DISPLAY=ENABLED
.
For example, use the LinkAhead demo profile in this branch, add BUILD_MODULE_EXT_PROPERTY_DISPLAY=ENABLED
to profiles/demo/custom/caosdb-server/caosdb-webui/build.properties.d/99.demo.conf
and add the following contents in a profiles/demo/custom/caosdb-server/caosdb-webui/conf/ext/json/ext_prop_display.json
:
{
"MusicalInstrument": {
"hide": [
{"name": "price", "roles": ["anonymous"], "users": []},
{"name": "Manufacturer", "roles": [], "users": ["admin"]}
]
}
}
(feel free to add to and change the config).
Verify that
price
is hidden from MusicalInstrument
s for anonymousManufacturer
is hidden for adminThen, check that for BUILD_MODULE_EXT_PROPERTY_DISPLAY=DISABLED
or after deleting profiles/demo/custom/caosdb-server/caosdb-webui/conf/ext/json/ext_prop_display.json
, all properties are shown. In a LinkAhead test setting, also verify that for BUILD_MODULE_EXT_PROPERTY_DISPLAY=DISABLED
, the alternating property backgrounds are recovered (see https://gitlab.indiscale.com/caosdb/src/theme-linkahead/-/merge_requests/3/diffs).
Please also check the new documentation and unit tests.
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
For further good practices have a look at our review guidelines.