Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改为从配置文件中获取这个app_code #689

Merged
merged 5 commits into from
Jun 12, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from drf_yasg.utils import swagger_auto_schema
from rest_framework import generics, status

from apigateway.conf.default import DEFAULT_TEST_APP
Lawrence-lkq marked this conversation as resolved.
Show resolved Hide resolved
from apigateway.apis.web.constants import ExportTypeEnum
from apigateway.apps.permission.constants import ApplyStatusEnum, GrantTypeEnum
from apigateway.apps.permission.models import (
Expand Down Expand Up @@ -70,7 +71,7 @@ def get_queryset(self):

# 仅展示资源存在的权限
resource_ids = Resource.objects.filter(gateway=self.request.gateway).values_list("id", flat=True)
return queryset.filter(gateway=self.request.gateway, resource_id__in=resource_ids)
return queryset.filter(gateway=self.request.gateway, resource_id__in=resource_ids).exclude(bk_app_code=DEFAULT_TEST_APP['bk_app_code'])


@method_decorator(
Expand Down
Loading