# HG changeset patch # User Goffi # Date 1614447233 -3600 # Node ID d897597cfa94bf9cd9ea64b8f38aaea381c3daf6 # Parent ca76767185e3458abef92fcaf98536379bc11e89 plugin list: set `overwrite_policy` to `any_publisher` for `grocery` list diff -r ca76767185e3 -r d897597cfa94 sat/plugins/plugin_misc_lists.py --- a/sat/plugins/plugin_misc_lists.py Sat Feb 27 18:32:34 2021 +0100 +++ b/sat/plugins/plugin_misc_lists.py Sat Feb 27 18:33:53 2021 +0100 @@ -492,8 +492,12 @@ service = client.jid.userhostJID() node = self._s.getSubmittedNS(f"{APP_NS_TICKETS}_{name}") options = { - self._p.OPT_ACCESS_MODEL: access_model + self._p.OPT_ACCESS_MODEL: access_model, } + if template_id == "grocery": + # for grocery list, we want all publishers to be able to set all items + # XXX: should node options be in TEMPLATE? + options[self._p.OPT_OVERWRITE_POLICY] = self._p.OWPOL_ANY_PUB await self._p.createNode(client, service, node, options) await self._s.setSchema(client, service, node, schema) list_elt = domish.Element((APP_NS_TICKETS, "list"))