feat: 修改用户的api

pull/4086/head
ibuler 2020-06-05 20:15:23 +08:00
parent b1640e5592
commit 71202e83f5
1 changed files with 3 additions and 1 deletions

View File

@ -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()