提交 71202e83 编写于 作者: baltery's avatar baltery

feat: 修改用户的api

上级 b1640e55
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册