Adding new action items
In the previous example, we just added some generic links in the header but there was no repository action behind that. In the previous chapter, we created some repository actions and we had to use some tricks to be able to test them. And now, in this section, we'll explain how to add a UI action related to the web flag on documents.
Step-by-step - adding an action item to set the web flag
Recall that a subset of SomeCo's Whitepapers will be available on the Web. Whitepapers that need to be published to the Web are identified by the sc:webable
aspect, which contains an isActive
flag. SomeCo employees can add or remove a Whitepaper to or from the Web by setting the flag to true or false. But SomeCo doesn't want just anybody to be able to set that flag. Alfresco doesn't have field-level security out of the box. So how can this be implemented?
One way to do this is to configure the property to be read-only in the interface and then use two actions, available only to the...