mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-09 11:19:08 +00:00
[Update] 用户列表添加移除操作(在其他组织中) (#3513)
* [Update] 用户列表添加移除操作(在其他组织中) * [Update] 用户列表添加移除操作(在其他组织中)2
This commit is contained in:
@@ -267,6 +267,16 @@ class RoleMixin:
|
||||
access_key = app.create_access_key()
|
||||
return app, access_key
|
||||
|
||||
def remove(self):
|
||||
if not current_org.is_real():
|
||||
return
|
||||
if self.can_user_current_org:
|
||||
current_org.users.remove(self)
|
||||
if self.can_admin_current_org:
|
||||
current_org.admins.remove(self)
|
||||
if self.can_audit_current_org:
|
||||
current_org.auditors.remove(self)
|
||||
|
||||
|
||||
class TokenMixin:
|
||||
CACHE_KEY_USER_RESET_PASSWORD_PREFIX = "_KEY_USER_RESET_PASSWORD_{}"
|
||||
|
Reference in New Issue
Block a user