Repository navigation
Let a token-only provider save a base URL change - #2136
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
管理 providers 时,编辑一个没有配置 OAuth app 的 token-only provider(
oauthEnabled=false),只改 base URL 无法保存,Save 按钮是禁用状态,必须顺手填一对 OAuth client ID/secret 才能存。原因是编辑表单把「这一行没有 OAuth app」当成了「这次编辑是去配 OAuth」:对
!oauthEnabled的行强制要求 client ID 和 secret 两栏都非空,于是任何只改 baseUrl(或只改显示名)的编辑都被挡下。后端ApplyEdits是纯 PATCH,baseUrl 单独修改完全合法,这个限制只存在于前端。现在 OAuth client pair 是一条统一规则:要么都填,要么都空。token-only 的行只改 baseUrl / 显示名即可保存;真正开始填 client ID 时仍然要求两栏都填。新配 OAuth 时才会顺带发送默认 scopes,此前没有 OAuth 的行保持没有。
Related
Closes #2135
Changes
Test plan