fix: 还原connection token 逻辑 (#8101)

Co-authored-by: feng626 <1304903146@qq.com>
pull/8105/head
fit2bot 3 years ago committed by GitHub
parent 611a00a5fa
commit af9248ef7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,6 +70,8 @@ class ClientProtocolMixin:
system_user = serializer.validated_data['system_user'] system_user = serializer.validated_data['system_user']
user = serializer.validated_data.get('user') user = serializer.validated_data.get('user')
if not user or not self.request.user.is_superuser:
user = self.request.user
return asset, application, system_user, user return asset, application, system_user, user
@staticmethod @staticmethod

Loading…
Cancel
Save