Search code examples
orbeon

Bulk Update Permissions in Orbeon Forms


In order to activate drafts I need to set Permission (Create + Owner Update,View ,Delete) in all my forms definition ( hundreds) .

Is there a way (API) to do it in bulk mode? Otherwise all forms definition have to be modified manually.


Solution

  • I can think of 2 ways to do this programmatically:

    • Using APIs
      • This assumes you have all the forms accessible from the Form Builder summary page, and are OK republishing them as-is.
      • Get the list of all the forms with the search API.
      • Retrieve the source of the form with the CRUD API.
      • Make the changes to the form definition.
      • Publish the new version using the publish API.
    • Changing the form definitions at the database level
      • In this case you'll be working with SQL, and making changes to the form definitions in-place, in orbeon_form_definition table.