5ccd03be by 冯轩

MOD:api/doc

1 parent c64af440
......@@ -1065,8 +1065,17 @@ class DocView(DocGenericView, DocHandler):
create_time_start = args.get('create_time_start')
create_time_end = args.get('create_time_end')
# 角色权限不符,返回空列表
token = request.META.get("HTTP_AUTHORIZATION")
user_role = rh.get_token(token[-11:])
self.running_log.info('[api doc] [user_role={0}] '.format(user_role))
if user_role == -1 or (user_role == 1 and business_type == 'HIL') or (user_role == 2 and business_type == 'AFC'):
pagination = {'current': page, 'total': 0, 'page_size': page_size}
res = {
'pagination': pagination,
'doc_list': []
}
return response.ok(data=res)
status_query = Q(status=status) if status is not None else Q()
application_id_query = Q(application_id__contains=application_id) if application_id is not None else Q()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!