mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-19 01:45:27 +00:00
perf: 修改 acl 登录
This commit is contained in:
@@ -90,7 +90,7 @@ class UserBaseACL(BaseACL):
|
||||
queryset = cls.objects.all()
|
||||
q = cls.users.get_filter_q(user)
|
||||
queryset = queryset.filter(q)
|
||||
return queryset.valid().distinct()
|
||||
return queryset.filter(is_active=True).distinct()
|
||||
|
||||
|
||||
class UserAssetAccountBaseACL(UserBaseACL, OrgModelMixin):
|
||||
@@ -125,4 +125,4 @@ class UserAssetAccountBaseACL(UserBaseACL, OrgModelMixin):
|
||||
kwargs['org_id'] = org_id
|
||||
if kwargs:
|
||||
queryset = queryset.filter(**kwargs)
|
||||
return queryset.valid().distinct().order_by('priority', 'date_created')
|
||||
return queryset.filter(is_active=True).distinct().order_by('priority', 'date_created')
|
||||
|
@@ -20,10 +20,6 @@ class LoginACL(UserBaseACL):
|
||||
def is_action(self, action):
|
||||
return self.action == action
|
||||
|
||||
@classmethod
|
||||
def filter_acl(cls, user):
|
||||
return user.login_acls.all().valid().distinct()
|
||||
|
||||
def create_confirm_ticket(self, request):
|
||||
from tickets import const
|
||||
from tickets.models import ApplyLoginTicket
|
||||
|
Reference in New Issue
Block a user