forgejo/web_src/js
oliverpool 65f8c22cc7 [BUG] admin oauth2 source required check (#4194)
#4059 was unfortunately incomplete: some custom_url fields are currently shown, even if they are not used by the provider. Moreover the `Use Custom URLs Instead of Default URLs` is always checked by default.

Manual testing:
- go to http://localhost:3000/admin/auths
- click on `Add authentication source`
- Choose `Authentication type`: `OAuth2`
- Choose `OAuth2 provider`: `GitLab`
- verify that the `Use Custom URLs Instead of Default URLs` option is **initially unchecked**
- enable the `Use Custom URLs Instead of Default URLs` checkbox
- verify that only the fields "Authorize", "Token" and "Profile" URLs are shown (no "Email URL", nor "Tenant").
- Switch the `OAuth2 provider` to `Azure AD v2`
- verify that the `Use Custom URLs Instead of Default URLs` option is **initially checked**
- verify that only the field "Tenant" is shown (with the default "organizations").

![image](/attachments/0e2b1508-861c-4b0e-ae6a-6eb24ce94911)

Note: this is loosely based on the upstream fix https://github.com/go-gitea/gitea/pull/31246 which I initially overlooked.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4194
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: oliverpool <git@olivier.pfad.fr>
Co-committed-by: oliverpool <git@olivier.pfad.fr>
2024-06-21 06:21:37 +00:00
..
components Fix Activity Page Contributors dropdown (#31264) 2024-06-18 20:05:23 +02:00
features [BUG] admin oauth2 source required check (#4194) 2024-06-21 06:21:37 +00:00
markup Prevent simultaneous editing of comments and issues (#31053) 2024-06-02 16:26:54 +02:00
modules Add form field id generation, remove duplicated ids (#30546) 2024-04-22 08:09:00 +02:00
render
standalone
utils Have time.js use UTC-related getters/setters (#30857) 2024-05-12 20:03:09 +02:00
vendor
webcomponents Move settings button back to the right in repo and org header 2024-04-26 23:59:08 +02:00
bootstrap.js Suppress Monaco JavaScript errors in Safari (#3805) 2024-05-18 21:07:09 +00:00
bootstrap.test.js
htmx.js
index.js replace jquery-minicolors with coloris (#30055) 2024-04-07 11:02:33 +02:00
jquery.js
svg.js Update JS any PY dependencies, remove workarounds (#30085) 2024-03-30 07:17:30 +01:00
svg.test.js
utils.js
utils.test.js
vitest.setup.js [BUG] Render emojis in labels in issue info popup 2024-03-30 11:18:46 +01:00