forgejo/templates/user/settings
zokki d6838462b8 feat: Global 2FA enforcement (#8753)
resolves #8549

This PR add a config to enforce 2FA for the whole Forgejo instance. It can be configured to `none`, `admin` or `all`.
A user who is required to enable 2FA is like a disabled user. He can only see the `/user/settings/security`-Page to enable 2FA, this should be similar to a user which needs to change his password. Also api and git-commands are not allowed.

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.

I will do it, if the general idea of this PR is a good feature.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Security features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/8753): <!--number 8753 --><!--line 0 --><!--description R2xvYmFsIDJGQSBlbmZvcmNlbWVudA==-->Global 2FA enforcement<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8753
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Ellen Εμιλία Άννα Zscheile <fogti@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: zokki <zokki.softwareschmiede@gmail.com>
Co-committed-by: zokki <zokki.softwareschmiede@gmail.com>
2025-08-15 10:56:45 +02:00
..
security feat: Global 2FA enforcement (#8753) 2025-08-15 10:56:45 +02:00
account.tmpl Rework user profile settings 2024-12-30 16:42:58 +01:00
actions.tmpl Support configuration variables on Gitea Actions (#24724) 2023-06-20 22:54:15 +00:00
appearance.tmpl feat(ui): localize theme names (#7168) 2025-03-09 15:12:30 +00:00
applications.tmpl chore(ui): improve svg icon margin consistency (#7172) 2025-03-09 15:05:34 +00:00
applications_oauth2.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
applications_oauth2_edit.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
applications_oauth2_edit_form.tmpl Fix checkbox field markup (#30666) 2024-04-28 15:39:01 +02:00
applications_oauth2_list.tmpl Fix inconsistent required field (#3583) 2024-05-01 18:29:42 +00:00
blocked_users.tmpl [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
grants_oauth2.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
hook_new.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
hooks.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
keys.tmpl Allow options to disable user ssh keys configuration from the interface on app.ini (#29447) 2024-03-11 23:36:57 +07:00
keys_gpg.tmpl fix: vertical center the date on GPG keys 2024-11-17 21:53:37 +01:00
keys_principal.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
keys_ssh.tmpl fix: make ssh key verification command more robust (#8821) 2025-08-11 07:44:27 +02:00
layout_footer.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
layout_head.tmpl Reduce margins on user settings page, introduce flex-container (#26046) 2023-07-31 07:16:03 +00:00
navbar.tmpl feat: Global 2FA enforcement (#8753) 2025-08-15 10:56:45 +02:00
organization.tmpl Refactor Safe modifier (#29392) 2024-02-26 22:30:27 +01:00
packages.tmpl feat(ui): improve description in packages settings (#7531) 2025-04-18 12:36:59 +00:00
packages_cleanup_rules_edit.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
packages_cleanup_rules_preview.tmpl Change to vertical navbar layout for secondary navbar for repo/user/admin settings (#24246) 2023-04-23 18:21:21 +08:00
profile.tmpl feat(ui): show size constraints of custom avatar (#7998) 2025-06-14 16:35:50 +02:00
repos.tmpl Remove fomantic list module (#30281) 2024-04-07 15:40:31 +02:00
runner_edit.tmpl Add user level action runners (#24995) 2023-05-31 09:39:54 +08:00
storage_overview.tmpl feat(ui): add quota overview (#6602) 2025-02-26 14:36:53 +00:00