fix: 修复创建动态系统用户时设置了home目录,使得所有推送的用户共用同一个home目录,导致目录权限只限制在第一个推送的用户,其他用户进行可连接性测试时失败的问题

pull/6113/head
Michael Bai 4 years ago committed by Jiangjie.Bai
parent fc1c9c564a
commit 8010bdecea

@ -103,6 +103,12 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
raise serializers.ValidationError(msg) raise serializers.ValidationError(msg)
return username return username
def validate_home(self, home):
username_same_with_user = self.initial_data.get("username_same_with_user")
if username_same_with_user:
return ''
return home
def validate_sftp_root(self, value): def validate_sftp_root(self, value):
if value in ['home', 'tmp']: if value in ['home', 'tmp']:
return value return value

Loading…
Cancel
Save