diff sat_pubsub/const.py @ 438:b5e1e8d93dd4

backend, pgsql: new `overwrite_policy` node setting: /!\ pgsql schema needs to be updated /!\ this settings can be set currently to 2 values: - `original_publisher` (default), when only original publisher of an item can overwrite it (except node owner/admin) - `any_publisher` when any entity with publishing right can overwrite any item.
author Goffi <goffi@goffi.org>
date Sat, 27 Feb 2021 21:20:32 +0100
parents 5e8b8ef5c862
children 074037832daf
line wrap: on
line diff
--- a/sat_pubsub/const.py	Mon Feb 08 19:01:29 2021 +0100
+++ b/sat_pubsub/const.py	Sat Feb 27 21:20:32 2021 +0100
@@ -69,8 +69,9 @@
 OPT_DELIVER_PAYLOADS = "pubsub#deliver_payloads"
 OPT_SEND_LAST_PUBLISHED_ITEM = "pubsub#send_last_published_item"
 OPT_PUBLISH_MODEL = 'pubsub#publish_model'
+OPT_OVERWRITE_POLICY = "pubsub#overwrite_policy"
+OPT_CONSISTENT_PUBLISHER = 'pubsub#consistent_publisher'
 OPT_SERIAL_IDS = 'pubsub#serial_ids'
-OPT_CONSISTENT_PUBLISHER = 'pubsub#consistent_publisher'
 OPT_FTS_LANGUAGE = 'pubsub#fts_language'
 VAL_AMODEL_OPEN = 'open'
 VAL_AMODEL_PRESENCE = 'presence'
@@ -86,6 +87,9 @@
 VAL_PMODEL_DEFAULT = VAL_PMODEL_PUBLISHERS
 VAL_RSM_MAX_DEFAULT = 10 # None for no limit
 VAL_FTS_GENERIC = 'generic'
+VAL_OWPOL_ORIGINAL = "original_publisher"
+VAL_OWPOL_ANY_PUB = "any_publisher"
+VAL_OWPOL_DEFAUT = VAL_OWPOL_ORIGINAL
 FLAG_ENABLE_RSM = True
 FLAG_ENABLE_MAM = True
 MAM_FILTER_CATEGORY = 'http://salut-a-toi.org/protocols/mam_filter_category'