From f78ffa4b747c27d1c777dfb49d377929a0973de5 Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 15 May 2014 09:51:11 +0200 Subject: [PATCH] [gen] Bugfix. --- gen/mixins/ToolMixin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gen/mixins/ToolMixin.py b/gen/mixins/ToolMixin.py index 41c448b..10daf54 100644 --- a/gen/mixins/ToolMixin.py +++ b/gen/mixins/ToolMixin.py @@ -275,8 +275,9 @@ class ToolMixin(BaseMixin): def getAllowedValue(self): '''Gets, for the current user, the value of index "Allowed".''' user = self.getUser() - # Get the user roles - res = user.getRoles() + # Get the user roles. If we do not make a copy of the list here, we will + # really add user logins among user roles! + res = user.getRoles()[:] # Get the user logins if user.login != 'anon': for login in user.getLogins(): @@ -1160,7 +1161,7 @@ class ToolMixin(BaseMixin): BasicUserFolder.validate = validate def getUserLine(self): - '''Returns a info about the currently logged user as a 2-tuple: first + '''Returns info about the currently logged user as a 2-tuple: first elem is the one-line user info as shown on every page; second line is the URL to edit user info.''' user = self.getUser()