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 Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
standalone lint: apply lint-frontend-fix 2024-03-26 19:04:28 +01:00
utils Have time.js use UTC-related getters/setters (#30857) 2024-05-12 20:03:09 +02:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
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 Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
htmx.js Auto-update the system status in admin dashboard (#29163) 2024-02-17 23:24:31 +01:00
index.js replace jquery-minicolors with coloris (#30055) 2024-04-07 11:02:33 +02:00
jquery.js Forbid variables containing jQuery collections not having the $ prefix (#29839) 2024-03-20 08:46:30 +01:00
svg.js Update JS any PY dependencies, remove workarounds (#30085) 2024-03-30 07:17:30 +01:00
svg.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
utils.js enforce maxlength in frontend (#29389) 2024-02-26 22:30:27 +01:00
utils.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
vitest.setup.js [BUG] Render emojis in labels in issue info popup 2024-03-30 11:18:46 +01:00