1
0
Fork 0
forked from forgejo/forgejo

[GITEA] Allow user to select email for file operations in Web UI

- Add a dropdown to the web interface for changing files to select which
Email should be used for the commit. It only shows (and verifies) that a
activated mail can be used, while this isn't necessary, it's better to
have this already in place.
- Added integration testing.
- Resolves https://codeberg.org/forgejo/forgejo/issues/281

(cherry picked from commit 564e701f40)
(cherry picked from commit de8f2e03cc)
(cherry picked from commit 0182cff12e)
(cherry picked from commit 9c74254d46)
(cherry picked from commit 2f0b68f821)
(cherry picked from commit 079b995d49)
(cherry picked from commit 6952ea6ee3)
This commit is contained in:
Gusted 2023-11-17 00:17:40 +01:00 committed by Earl Warren
parent 5f528dd85f
commit 6c7d5a5d14
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
10 changed files with 303 additions and 25 deletions

View file

@ -54,10 +54,11 @@ func TestEmptyRepoAddFile(t *testing.T) {
doc := NewHTMLParser(t, resp.Body).Find(`input[name="commit_choice"]`)
assert.Empty(t, doc.AttrOr("checked", "_no_"))
req = NewRequestWithValues(t, "POST", "/user30/empty/_new/"+setting.Repository.DefaultBranch, map[string]string{
"_csrf": GetCSRF(t, session, "/user/settings"),
"commit_choice": "direct",
"tree_path": "test-file.md",
"content": "newly-added-test-file",
"_csrf": GetCSRF(t, session, "/user/settings"),
"commit_choice": "direct",
"tree_path": "test-file.md",
"content": "newly-added-test-file",
"commit_mail_id": "32",
})
resp = session.MakeRequest(t, req, http.StatusSeeOther)