From e60d563d27a9e6d6336bac402d060777f30ca1e7 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 27 Feb 2021 18:33:53 +0100 Subject: [PATCH] plugin list: set `overwrite_policy` to `any_publisher` for `grocery` list --- sat/plugins/plugin_misc_lists.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sat/plugins/plugin_misc_lists.py b/sat/plugins/plugin_misc_lists.py index c32f2952..fae73f9d 100644 --- a/sat/plugins/plugin_misc_lists.py +++ b/sat/plugins/plugin_misc_lists.py @@ -492,8 +492,12 @@ class PubsubLists: 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"))