From 0315d434e9d89eed3b33674372807cac7bcdf0cd Mon Sep 17 00:00:00 2001 From: Moritz Kirmse Date: Fri, 8 Jan 2021 10:29:19 +0100 Subject: [PATCH] fix bug in getuserinfo --- geoportal/geoportailv3_geoportal/views/authentication.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geoportal/geoportailv3_geoportal/views/authentication.py b/geoportal/geoportailv3_geoportal/views/authentication.py index cd75c6637..95c8eab4d 100644 --- a/geoportal/geoportailv3_geoportal/views/authentication.py +++ b/geoportal/geoportailv3_geoportal/views/authentication.py @@ -142,11 +142,11 @@ def __init__(self, request): def get_user_info(self): if self.request.user is not None: return {"login": self.request.user.username, - "role": self.request.user.role.name, - "role_id": self.request.user.role.id, + "role": self.request.user.settings_role.name, + "role_id": self.request.user.settings_role.id, "mymaps_role": getattr( self.request.user, - 'mymaps_role', self.request.user.role.id), + 'mymaps_role', self.request.user.settings_role.id), "mail": getattr( self.request.user, 'mail', self.request.user.email),