Project

General

Profile

Bug #8381

attributes_ng: fix typo in attribute names related to roles

Added by Benjamin Dauvergne over 5 years ago. Updated about 3 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
25 Sep 2015
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:

Description

user_* -> a2_user_*

History

#1

Updated by Benjamin Dauvergne over 5 years ago

  • Status changed from Nouveau to Solution déployée
commit 932b78ff44d00d384710adc2bd2d153b752212ed
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Sep 25 15:58:16 2015 +0200

    Revert "Rename role attributes (fixes #7666)" 

    This reverts commit 19b89879d08e0aad5dc34f05e08f63184ccc5336.

diff --git a/src/authentic2/attributes_ng/sources/django_user.py b/src/authentic2/attributes_ng/sources/django_user.py
index f4d6ab5..2c5c5ac 100644
--- a/src/authentic2/attributes_ng/sources/django_user.py
+++ b/src/authentic2/attributes_ng/sources/django_user.py
@@ -55,7 +55,7 @@ def get_attributes(instance, ctx):
         ctx['django_user_identifier'] = user.username.rsplit('@', 1)[0] if '@' in user.username else ''
     Role = get_role_model()
     roles = Role.objects.for_user(user)
-    ctx['user_role_slug'] = roles.values_list('slug', flat=True)
-    ctx['user_role_name'] = roles.values_list('name', flat=True)
-    ctx['user_role_uuid'] = roles.values_list('uuid', flat=True)
+    ctx['a2_role_slugs'] = roles.values_list('slug', flat=True)
+    ctx['a2_role_names'] = roles.values_list('name', flat=True)
+    ctx['a2_role_uuids'] = roles.values_list('uuid', flat=True)
     return ctx

#2

Updated by Benjamin Dauvergne about 3 years ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF