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

fix(bkuser): login api auth error #1390

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/bk-user/bkuser/apis/login/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TenantRetrieveApi(LoginApiAccessControlMixin, generics.RetrieveAPIView):
lookup_field = "id"


class IdpListApi(generics.ListAPIView, LoginApiAccessControlMixin):
class IdpListApi(LoginApiAccessControlMixin, generics.ListAPIView):
pagination_class = None
serializer_class = IdpListOutputSLZ

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def forwards_func(apps, schema_editor):
admin_username,
)

# TODO: 国际化时需要考虑如何实现
Tenant = apps.get_model("tenant", "Tenant")
TenantUser = apps.get_model("tenant", "TenantUser")
TenantManager = apps.get_model("tenant", "TenantManager")
Expand Down Expand Up @@ -76,7 +77,7 @@ def forwards_func(apps, schema_editor):
TenantManager.objects.create(tenant=default_tenant, tenant_user=tenant_user)

Idp.objects.create(
name="default",
name="本地账密",
plugin_id=BuiltinIdpPluginEnum.LOCAL,
owner_tenant_id=default_tenant.id,
plugin_config=LocalIdpPluginConfig(data_source_ids=[data_source.id]).model_dump(),
Expand Down
Loading