mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 13:39:27 -02:30
make User.last_login read_only=True in its serializer
This commit is contained in:
@@ -884,6 +884,9 @@ class UserSerializer(BaseSerializer):
|
||||
fields = ('*', '-name', '-description', '-modified',
|
||||
'username', 'first_name', 'last_name',
|
||||
'email', 'is_superuser', 'is_system_auditor', 'password', 'ldap_dn', 'last_login', 'external_account')
|
||||
extra_kwargs = {
|
||||
'last_login': {'read_only': True}
|
||||
}
|
||||
|
||||
def to_representation(self, obj):
|
||||
ret = super(UserSerializer, self).to_representation(obj)
|
||||
|
||||
Reference in New Issue
Block a user