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

Support docs url prefix #1365

Merged
merged 2 commits into from
Nov 4, 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/login/bklogin/bkauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _bk_login(request):
"is_plain": request.path_info == "/plain/",
}

# NOTE: account/login.html 为支持自适应大小的模板
# NOTE: login.html 为支持自适应大小的模板
response = TemplateResponse(request, "login.html", context)
response = set_bk_token_invalid(request, response)
return response
Expand Down
4 changes: 2 additions & 2 deletions src/login/bklogin/ee_login/settings_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
###########################
# 自定义登录 custom_login #
###########################
# 配置自定义登录请求和登录回调的响应函数, 如:CUSTOM_LOGIN_VIEW = 'ee_official_login.oauth.google.views.login'
# 配置自定义登录请求和登录回调的响应函数, 如:CUSTOM_LOGIN_VIEW = 'bklogin.ee_official_login.oauth.google.views.login'
CUSTOM_LOGIN_VIEW = ""
# 配置自定义验证是否登录的认证函数, 如:CUSTOM_AUTHENTICATION_BACKEND = 'ee_official_login.oauth.google.backends.OauthBackend'
# 配置自定义验证是否登录的认证函数, 如:CUSTOM_AUTHENTICATION_BACKEND = 'bklogin.ee_official_login.oauth.google.backends.OauthBackend'
CUSTOM_AUTHENTICATION_BACKEND = ""
8 changes: 4 additions & 4 deletions src/login/bklogin/ee_login/settings_login_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
###########################
# 自定义登录 custom_login #
###########################
# 配置自定义登录请求和登录回调的响应函数, 如:CUSTOM_LOGIN_VIEW = 'ee_official_login.oauth.google.views.login'
CUSTOM_LOGIN_VIEW = "ee_official_login.mock.views.login"
# 配置自定义验证是否登录的认证函数, 如:CUSTOM_AUTHENTICATION_BACKEND = 'ee_official_login.oauth.google.backends.OauthBackend'
CUSTOM_AUTHENTICATION_BACKEND = "ee_official_login.mock.backends.MockBackend"
# 配置自定义登录请求和登录回调的响应函数, 如:CUSTOM_LOGIN_VIEW = 'bklogin.ee_official_login.oauth.google.views.login'
CUSTOM_LOGIN_VIEW = "bklogin.ee_official_login.mock.views.login"
# 配置自定义验证是否登录的认证函数, 如:CUSTOM_AUTHENTICATION_BACKEND = 'bklogin.ee_official_login.oauth.google.backends.OauthBackend'
CUSTOM_AUTHENTICATION_BACKEND = "bklogin.ee_official_login.mock.backends.MockBackend"
8 changes: 4 additions & 4 deletions src/login/bklogin/ee_login/settings_login_oauth_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
###########################
# 自定义登录 custom_login #
###########################
# 配置自定义登录请求和登录回调的响应函数, 如:CUSTOM_LOGIN_VIEW = 'ee_official_login.oauth.google.views.login'
CUSTOM_LOGIN_VIEW = "ee_official_login.oauth.google.views.login"
# 配置自定义验证是否登录的认证函数, 如:CUSTOM_AUTHENTICATION_BACKEND = 'ee_official_login.oauth.google.backends.OauthBackend'
CUSTOM_AUTHENTICATION_BACKEND = "ee_official_login.oauth.google.backends.OauthBackend"
# 配置自定义登录请求和登录回调的响应函数, 如:CUSTOM_LOGIN_VIEW = 'bklogin.ee_official_login.oauth.google.views.login'
CUSTOM_LOGIN_VIEW = "bklogin.ee_official_login.oauth.google.views.login"
# 配置自定义验证是否登录的认证函数, 如:CUSTOM_AUTHENTICATION_BACKEND = 'bklogin.ee_official_login.oauth.google.backends.OauthBackend'
CUSTOM_AUTHENTICATION_BACKEND = "bklogin.ee_official_login.oauth.google.backends.OauthBackend"
2 changes: 1 addition & 1 deletion src/login/bklogin/ee_official_login/mock/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def login(request):
"login_redirect_to": "",
}

template_name = "account/login.html"
template_name = "login.html"
response = TemplateResponse(request, template_name, context)
response = set_bk_token_invalid(request, response)
return response
4 changes: 2 additions & 2 deletions src/saas/bkuser_shell/config/common/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
###################
# Footer & Header #
###################
BK_DOC_URL = "https://bk.tencent.com/docs/markdown/用户管理/产品白皮书/产品简介/README.md"

BK_DOCS_URL_PREFIX = env("BK_DOCS_URL_PREFIX", 'https://bk.tencent.com/docs')
BK_DOC_URL = f"{BK_DOCS_URL_PREFIX}/markdown/ZH/UserManage/2.5/UserGuide/Introduce/README.md"

# ==============================================================================
# Proxy http connections
Expand Down