mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-14 04:16:49 +00:00
feat: 修改用户的api
This commit is contained in:
parent
b1640e5592
commit
71202e83f5
@ -3,10 +3,12 @@
|
||||
from .. import utils
|
||||
from users.models import User
|
||||
|
||||
from orgs.utils import current_org
|
||||
|
||||
|
||||
class UserQuerysetMixin:
|
||||
def get_queryset(self):
|
||||
if self.request.query_params.get('all'):
|
||||
if self.request.query_params.get('all') or not current_org.is_real():
|
||||
queryset = User.objects.exclude(role=User.ROLE_APP)
|
||||
else:
|
||||
queryset = utils.get_current_org_members()
|
||||
|
Loading…
Reference in New Issue
Block a user