Projet

Général

Profil

Bug #8381

attributes_ng: fix typo in attribute names related to roles

Ajouté par Benjamin Dauvergne il y a plus de 8 ans. Mis à jour il y a plus de 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
25 septembre 2015
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:

Description

user_* -> a2_user_*

Historique

#1

Mis à jour par Benjamin Dauvergne il y a plus de 8 ans

  • Statut changé de Nouveau à 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

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF