3b8a6905 by 冯轩

:MOD

2 parents d8739562 fe02ac2d
...@@ -1084,6 +1084,14 @@ class DocView(DocGenericView, DocHandler): ...@@ -1084,6 +1084,14 @@ class DocView(DocGenericView, DocHandler):
1084 # } 1084 # }
1085 # return response.ok(data=res) 1085 # return response.ok(data=res)
1086 raise NoPermissionException('no permission') 1086 raise NoPermissionException('no permission')
1087 if user_role is None or user_role == '-1' or (user_role == '1' and business_type == 'HIL') or (user_role == '2' and business_type == 'AFC'):
1088 # pagination = {'current': page, 'total': 0, 'page_size': page_size}
1089 # res = {
1090 # 'pagination': pagination,
1091 # 'doc_list': []
1092 # }
1093 # return response.ok(data=res)
1094 raise NoPermissionException('no permission')
1087 1095
1088 status_query = Q(status=status) if status is not None else Q() 1096 status_query = Q(status=status) if status is not None else Q()
1089 application_id_query = Q(application_id__contains=application_id) if application_id is not None else Q() 1097 application_id_query = Q(application_id__contains=application_id) if application_id is not None else Q()
...@@ -1917,12 +1925,13 @@ class InvoiceExcelView(GenericView): ...@@ -1917,12 +1925,13 @@ class InvoiceExcelView(GenericView):
1917 def post(self, request, args): 1925 def post(self, request, args):
1918 application_ids = args.get('application_ids') 1926 application_ids = args.get('application_ids')
1919 application_entity = args.get('application_entity') 1927 application_entity = args.get('application_entity')
1920 1928 self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333'))
1921 # 角色权限不符,返回异常 1929 # 角色权限不符,返回异常
1922 token = request.META.get("HTTP_AUTHORIZATION") 1930 token = request.META.get("HTTP_AUTHORIZATION")
1923 user_role = rh.get_token(token[-11:]) 1931 user_role = rh.get_token(token[-11:])
1924 self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format(user_role)) 1932 self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format(user_role))
1925 if user_role is None or user_role == '-1' or (user_role == '1' and application_entity == 'HIL') or (user_role == '2' and application_entity == 'AFC'): 1933 if user_role is None or user_role == '-1' or (user_role == '1' and application_entity == '2') or (user_role == '2' and application_entity == '1'):
1934 self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity))
1926 raise NoPermissionException('no permission') 1935 raise NoPermissionException('no permission')
1927 1936
1928 url = 'http://127.0.0.1:8088/napi/invoice/downloadExcelOri' 1937 url = 'http://127.0.0.1:8088/napi/invoice/downloadExcelOri'
...@@ -1961,12 +1970,14 @@ class InvoiceQueryInfoView(GenericView): ...@@ -1961,12 +1970,14 @@ class InvoiceQueryInfoView(GenericView):
1961 def post(self, request, args): 1970 def post(self, request, args):
1962 application_ids = args.get('application_ids') 1971 application_ids = args.get('application_ids')
1963 application_entity = args.get('application_entity') 1972 application_entity = args.get('application_entity')
1973 self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333'))
1964 1974
1965 # 角色权限不符,返回异常 1975 # 角色权限不符,返回异常
1966 token = request.META.get("HTTP_AUTHORIZATION") 1976 token = request.META.get("HTTP_AUTHORIZATION")
1967 user_role = rh.get_token(token[-11:]) 1977 user_role = rh.get_token(token[-11:])
1968 self.running_log.info('[InvoiceQueryInfoView] [user_role={0}] '.format(user_role)) 1978 self.running_log.info('[InvoiceQueryInfoView] [user_role={0}] '.format(user_role))
1969 if user_role is None or user_role == '-1' or (user_role == '1' and application_entity == 'HIL') or (user_role == '2' and application_entity == 'AFC'): 1979 if user_role is None or user_role == '-1' or (user_role == '1' and application_entity == '2') or (user_role == '2' and application_entity == '1'):
1980 self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity))
1970 raise NoPermissionException('no permission') 1981 raise NoPermissionException('no permission')
1971 1982
1972 url = 'http://127.0.0.1:8088/napi/invoice/queryInfoOri' 1983 url = 'http://127.0.0.1:8088/napi/invoice/queryInfoOri'
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!