From d0c18795212978b3f1caadc5b121da0a1f6c0a37 Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Thu, 4 Mar 2021 08:20:05 +0100 Subject: [PATCH] Update users on can_see_extra_data permission change --- server/openslides/users/signals.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/openslides/users/signals.py b/server/openslides/users/signals.py index 6d6074e11..6d42dfb98 100644 --- a/server/openslides/users/signals.py +++ b/server/openslides/users/signals.py @@ -15,11 +15,11 @@ def get_permission_change_data(sender, permissions=None, **kwargs): users_app = apps.get_app_config(app_label="users") for permission in permissions: # There could be only one 'users.can_see_name' and then we want to return data. - if ( - permission.content_type.app_label == users_app.label - and permission.codename == "can_see_name" - ): - yield from users_app.get_startup_elements() + if permission.content_type.app_label == users_app.label: + if permission.codename == "can_see_name": + yield from users_app.get_startup_elements() + elif permission.codename == "can_see_extra_data": + yield users_app.get_model("User") def create_builtin_groups_and_admin(**kwargs):