OpenWGA 7.11 - TMLScript reference

HDBModel
Method :

setContentEditors(content, contentEditors, childEditors)

On object HDBModel
Usage Sets the allowed editors for a content document
Description

This is a helper method for specifying allowed editors on a content document and its subhierarchy and the content document pendant to the editors attribute on storages in HDBModel definition. It is available as a method instead as for contents it normally makes more sense to specify individual editor rights on every singe document than to predefine them globally for all contents in the model definition. Therefor this method is intended to be used inside HDBModel event scripts. A good place is the postUpdate() script.

The first given list specifies users, groups and roles who should be allowed to edit this document itself. The second list does the same for the complete subhierarchy of this document (unless it is redefined deeper down in the hierarchy). Specify empty lists to allow everyone.

The method actually sets the fields "pageeditors" and "childeditors" on the respective page (see Authorisation fields on data documents). 

Parameters

content (WGAPI object WGContent):

The content object to set the allowed editors for.

contentEditors (List of strings):

List of users, groups and roles

childEditors (List of strings):

List of users, groups and roles


Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events