去掉发票接口权限校验
Showing
1 changed file
with
12 additions
and
12 deletions
... | @@ -1997,12 +1997,12 @@ class InvoiceExcelView(GenericView): | ... | @@ -1997,12 +1997,12 @@ class InvoiceExcelView(GenericView): |
1997 | application_entity = args.get('application_entity') | 1997 | application_entity = args.get('application_entity') |
1998 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333')) | 1998 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333')) |
1999 | # 角色权限不符,返回异常 | 1999 | # 角色权限不符,返回异常 |
2000 | token = request.META.get("HTTP_AUTHORIZATION") | 2000 | #token = request.META.get("HTTP_AUTHORIZATION") |
2001 | user_role = rh.get_token(token[-11:]) | 2001 | #user_role = rh.get_token(token[-11:]) |
2002 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format(user_role)) | 2002 | #self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format(user_role)) |
2003 | 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'): | 2003 | #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'): |
2004 | self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity)) | 2004 | # self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity)) |
2005 | raise NoPermissionException('no permission') | 2005 | # raise NoPermissionException('no permission') |
2006 | 2006 | ||
2007 | url = 'http://127.0.0.1:8088/napi/invoice/downloadExcelOri' | 2007 | url = 'http://127.0.0.1:8088/napi/invoice/downloadExcelOri' |
2008 | body = { | 2008 | body = { |
... | @@ -2043,12 +2043,12 @@ class InvoiceQueryInfoView(GenericView): | ... | @@ -2043,12 +2043,12 @@ class InvoiceQueryInfoView(GenericView): |
2043 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333')) | 2043 | self.running_log.info('[InvoiceExcelView] [user_role={0}] '.format('111222333')) |
2044 | 2044 | ||
2045 | # 角色权限不符,返回异常 | 2045 | # 角色权限不符,返回异常 |
2046 | token = request.META.get("HTTP_AUTHORIZATION") | 2046 | #token = request.META.get("HTTP_AUTHORIZATION") |
2047 | user_role = rh.get_token(token[-11:]) | 2047 | #user_role = rh.get_token(token[-11:]) |
2048 | self.running_log.info('[InvoiceQueryInfoView] [user_role={0}] '.format(user_role)) | 2048 | #self.running_log.info('[InvoiceQueryInfoView] [user_role={0}] '.format(user_role)) |
2049 | 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'): | 2049 | #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'): |
2050 | self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity)) | 2050 | # self.running_log.info('[InvoiceExcelView no permission] [user_role={0}] [application_entity={1}]'.format(user_role, application_entity)) |
2051 | raise NoPermissionException('no permission') | 2051 | # raise NoPermissionException('no permission') |
2052 | 2052 | ||
2053 | url = 'http://127.0.0.1:8088/napi/invoice/queryInfoOri' | 2053 | url = 'http://127.0.0.1:8088/napi/invoice/queryInfoOri' |
2054 | body = { | 2054 | body = { | ... | ... |
-
Please register or sign in to post a comment