From a04acb828d38384db18d1005c72ef8bf62433b86 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 21 Sep 2023 10:25:59 +0200 Subject: [PATCH] Update Map.can_edit docstring --- umap/models.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/umap/models.py b/umap/models.py index 6c9c9fef..86c69518 100644 --- a/umap/models.py +++ b/umap/models.py @@ -217,8 +217,13 @@ class Map(NamedModel): Define if a user can edit or not the instance, according to his account or the request. - In ownership mode: only owner and editors - In anononymous mode: only "anonymous owners" (having edit cookie set) + In owner mode: + - only owner by default (OWNER) + - any editor if mode is EDITORS + - anyone otherwise (ANONYMOUS) + In anonymous owner mode: + - only owner (has ownership cookie) by default (OWNER) + - anyone otherwise (ANONYMOUS) """ can = False if request and not self.owner: