diff --git a/apps/gsekit/process/views/process.py b/apps/gsekit/process/views/process.py index 5804c12..a157b2f 100644 --- a/apps/gsekit/process/views/process.py +++ b/apps/gsekit/process/views/process.py @@ -24,6 +24,8 @@ from apps.iam.handlers.drf import InstanceActionPermission, ViewBusinessPermission from apps.utils.models import queryset_to_dict_list from apps.utils.drf import GeneralOrderingFilter +from common.log import logger + ProcessViewTags = ["process"] @@ -38,6 +40,8 @@ def get_queryset(self): return self.model.objects.filter(bk_biz_id=self.kwargs["bk_biz_id"]) def get_permissions(self): + logger.info(f"gatewaytest: action: {self.action}") + logger.info(f"gatewaytest: action: {self.request.jwt.payload}") if self.action in ["operate_process"]: return [InstanceActionPermission([ActionEnum.MANAGE_PROCESS], ResourceEnum.BUSINESS)] return [ViewBusinessPermission()] diff --git a/apps/iam/handlers/permission.py b/apps/iam/handlers/permission.py index cd46c78..7371d1b 100644 --- a/apps/iam/handlers/permission.py +++ b/apps/iam/handlers/permission.py @@ -204,6 +204,7 @@ def is_allowed( request = self.make_request(action, resources) try: + logger.info(f"gatewaytest: {request.jwt.payload}, {request.user.username}, {request.user.is_superuser}") result = self.iam_client.is_allowed(request) except AuthAPIError as e: logger.exception(f"[IAM AuthAPI Error]: {e}")