MOD:log
Showing
1 changed file
with
6 additions
and
3 deletions
... | @@ -1903,12 +1903,13 @@ class InvoiceExcelView(GenericView): | ... | @@ -1903,12 +1903,13 @@ class InvoiceExcelView(GenericView): |
1903 | def post(self, request, args): | 1903 | def post(self, request, args): |
1904 | application_ids = args.get('application_ids') | 1904 | application_ids = args.get('application_ids') |
1905 | application_entity = args.get('application_entity') | 1905 | application_entity = args.get('application_entity') |
1906 | 1906 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333')) | |
1907 | # 角色权限不符,返回异常 | 1907 | # 角色权限不符,返回异常 |
1908 | token = request.META.get("HTTP_AUTHORIZATION") | 1908 | token = request.META.get("HTTP_AUTHORIZATION") |
1909 | user_role = rh.get_token(token[-11:]) | 1909 | user_role = rh.get_token(token[-11:]) |
1910 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format(user_role)) | 1910 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format(user_role)) |
1911 | 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'): | 1911 | 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'): |
1912 | self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity)) | ||
1912 | raise NoPermissionException('no permission') | 1913 | raise NoPermissionException('no permission') |
1913 | 1914 | ||
1914 | url = 'http://127.0.0.1:8088/napi/invoice/downloadExcelOri' | 1915 | url = 'http://127.0.0.1:8088/napi/invoice/downloadExcelOri' |
... | @@ -1947,12 +1948,14 @@ class InvoiceQueryInfoView(GenericView): | ... | @@ -1947,12 +1948,14 @@ class InvoiceQueryInfoView(GenericView): |
1947 | def post(self, request, args): | 1948 | def post(self, request, args): |
1948 | application_ids = args.get('application_ids') | 1949 | application_ids = args.get('application_ids') |
1949 | application_entity = args.get('application_entity') | 1950 | application_entity = args.get('application_entity') |
1951 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333')) | ||
1950 | 1952 | ||
1951 | # 角色权限不符,返回异常 | 1953 | # 角色权限不符,返回异常 |
1952 | token = request.META.get("HTTP_AUTHORIZATION") | 1954 | token = request.META.get("HTTP_AUTHORIZATION") |
1953 | user_role = rh.get_token(token[-11:]) | 1955 | user_role = rh.get_token(token[-11:]) |
1954 | self.running_log.info('[InvoiceQueryInfoView] [user_role={0}] '.format(user_role)) | 1956 | self.running_log.info('[InvoiceQueryInfoView] [user_role={0}] '.format(user_role)) |
1955 | 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'): | 1957 | 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'): |
1958 | self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity)) | ||
1956 | raise NoPermissionException('no permission') | 1959 | raise NoPermissionException('no permission') |
1957 | 1960 | ||
1958 | url = 'http://127.0.0.1:8088/napi/invoice/queryInfoOri' | 1961 | url = 'http://127.0.0.1:8088/napi/invoice/queryInfoOri' | ... | ... |
-
Please register or sign in to post a comment