mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Merge pull request #312 from rooftopcellist/auth_text_fix
Removes auth field from Access List serializer
This commit is contained in:
@@ -779,10 +779,10 @@ class UserSerializer(BaseSerializer):
|
|||||||
'username', 'first_name', 'last_name',
|
'username', 'first_name', 'last_name',
|
||||||
'email', 'is_superuser', 'is_system_auditor', 'password', 'ldap_dn', 'external_account')
|
'email', 'is_superuser', 'is_system_auditor', 'password', 'ldap_dn', 'external_account')
|
||||||
|
|
||||||
def to_representation(self, obj):
|
def to_representation(self, obj): # TODO: Remove in 3.3
|
||||||
ret = super(UserSerializer, self).to_representation(obj)
|
ret = super(UserSerializer, self).to_representation(obj)
|
||||||
ret.pop('password', None)
|
ret.pop('password', None)
|
||||||
if obj:
|
if obj and type(self) is UserSerializer or self.version == 1:
|
||||||
ret['auth'] = obj.social_auth.values('provider', 'uid')
|
ret['auth'] = obj.social_auth.values('provider', 'uid')
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user