Author API Initialization
restricted_tags
Controls whether the Item data can be saved.
You would want to use this to prevent specific Items from being saved based on your restricted Tags, for example, not allowing authors to make changes to Items that have been assigned the Tag "archived"
.
Note This only restricts write access. If you want to restrict read access to the Item, you should use the config.item_list.filter.restricted.tags
initialization option instead.
Values
Attribute path config.item_edit.item.save.restricted_tags
Type object
Properties
-
allow_save boolean
Controls whether the save button will be enabled, even when the Item has restricted Tags.
You would want to use this to allow the save button to be clicked in order to catch the
save
event to implement your own custom save logic.This property is only applicable when
restricted_tags.either
orrestricted_tags.all
are provided.Note If the event is not prevented (e.g.
event.preventDefault()
), the save operation will fail due to the restricted Tags.Default:
false
var initializationOptions = { "config": { "activity_edit": { "save": { "restricted_tags": { "allow_save": true, "either" : [ { "type": "TYPE1", "name": "NAME1" }, { "type": "TYPE1", "name": "NAME2" } ] } } } } };
-
all array[TagsV2]
Prevent Items that contain all of the specified Tags from saving.
var initializationOptions = { "config": { "item_edit": { "item": { "save": { "restricted_tags": { "all" : [ { "type": "TYPE1", "name": "NAME1" }, { "type": "TYPE1", "name": "NAME2" }, { "type": "TYPE2", "name": "NAME3" } ] } } } } } };
-
either array[TagsV2]
Prevent Items that contain at least one of the specified Tags from saving.
var initializationOptions = { "config": { "item_edit": { "item": { "save": { "restricted_tags": { "either" : [ { "type": "TYPE1", "name": "NAME1" }, { "type": "TYPE1", "name": "NAME2" }, { "type": "TYPE2", "name": "NAME3" } ] } } } } } };