mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-05 17:30:30 +00:00
perf: 移除资源创建时对于Auditor用户的限制
This commit is contained in:
@@ -113,17 +113,6 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer):
|
||||
raise serializers.ValidationError(msg)
|
||||
return password
|
||||
|
||||
def validate_groups(self, groups):
|
||||
"""
|
||||
审计员不能加入到组中
|
||||
"""
|
||||
role = self.initial_data.get('role')
|
||||
if self.instance:
|
||||
role = role or self.instance.role
|
||||
if role == User.ROLE.AUDITOR:
|
||||
return []
|
||||
return groups
|
||||
|
||||
@staticmethod
|
||||
def change_password_to_raw(attrs):
|
||||
password = attrs.pop('password', None)
|
||||
|
Reference in New Issue
Block a user