mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-08 10:49:08 +00:00
[Update] 修改只有local用户需要发送创建成功邮件、发送密码过期邮件;
This commit is contained in:
@@ -596,6 +596,11 @@ class User(AuthMixin, TokenMixin, RoleMixin, MFAMixin, AbstractUser):
|
||||
user.save()
|
||||
user.groups.add(UserGroup.initial())
|
||||
|
||||
def can_send_created_mail(self):
|
||||
if self.email and self.source == self.SOURCE_LOCAL:
|
||||
return True
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
def generate_fake(cls, count=100):
|
||||
from random import seed, choice
|
||||
|
Reference in New Issue
Block a user