MOD:api/doc
Showing
1 changed file
with
9 additions
and
0 deletions
... | @@ -1065,8 +1065,17 @@ class DocView(DocGenericView, DocHandler): | ... | @@ -1065,8 +1065,17 @@ class DocView(DocGenericView, DocHandler): |
1065 | create_time_start = args.get('create_time_start') | 1065 | create_time_start = args.get('create_time_start') |
1066 | create_time_end = args.get('create_time_end') | 1066 | create_time_end = args.get('create_time_end') |
1067 | 1067 | ||
1068 | # 角色权限不符,返回空列表 | ||
1068 | token = request.META.get("HTTP_AUTHORIZATION") | 1069 | token = request.META.get("HTTP_AUTHORIZATION") |
1069 | user_role = rh.get_token(token[-11:]) | 1070 | user_role = rh.get_token(token[-11:]) |
1071 | self.running_log.info('[api doc] [user_role={0}] '.format(user_role)) | ||
1072 | if user_role == -1 or (user_role == 1 and business_type == 'HIL') or (user_role == 2 and business_type == 'AFC'): | ||
1073 | pagination = {'current': page, 'total': 0, 'page_size': page_size} | ||
1074 | res = { | ||
1075 | 'pagination': pagination, | ||
1076 | 'doc_list': [] | ||
1077 | } | ||
1078 | return response.ok(data=res) | ||
1070 | 1079 | ||
1071 | status_query = Q(status=status) if status is not None else Q() | 1080 | status_query = Q(status=status) if status is not None else Q() |
1072 | application_id_query = Q(application_id__contains=application_id) if application_id is not None else Q() | 1081 | application_id_query = Q(application_id__contains=application_id) if application_id is not None else Q() | ... | ... |
-
Please register or sign in to post a comment