Skip to content

Commit 0ebc915

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated translations via Crowdin Allow filtering PRs by poster in the ListPullRequests API (go-gitea#32209) Fix bug when there are multiple triggers with workflow dispatch (go-gitea#32200) [skip ci] Updated licenses and gitignores [skip ci] Updated translations via Crowdin Upgrade htmx to 2.0.3 (go-gitea#32192) Enhance USER_DISABLED_FEATURES to allow disabling change username or full name (go-gitea#31959) [skip ci] Updated translations via Crowdin Add support for searching users by email (go-gitea#30908) Fix PR creation on forked repositories (go-gitea#31863) [skip ci] Updated translations via Crowdin Fixed race condition when deleting documents by repoId in ElasticSearch (go-gitea#32185) add {{TEST_MINIO_ENDPOINT}} for local testing "with/without" docker + fix pgsql testing doc (go-gitea#32105) [skip ci] Updated translations via Crowdin
2 parents 4f27d60 + d3ada91 commit 0ebc915

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3335
-72
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ TEST_PGSQL_DBNAME ?= testgitea
179179
TEST_PGSQL_USERNAME ?= postgres
180180
TEST_PGSQL_PASSWORD ?= postgres
181181
TEST_PGSQL_SCHEMA ?= gtestschema
182+
TEST_MINIO_ENDPOINT ?= minio:9000
182183
TEST_MSSQL_HOST ?= mssql:1433
183184
TEST_MSSQL_DBNAME ?= gitea
184185
TEST_MSSQL_USERNAME ?= sa
@@ -574,6 +575,7 @@ generate-ini-pgsql:
574575
-e 's|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
575576
-e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
576577
-e 's|{{TEST_PGSQL_SCHEMA}}|${TEST_PGSQL_SCHEMA}|g' \
578+
-e 's|{{TEST_MINIO_ENDPOINT}}|${TEST_MINIO_ENDPOINT}|g' \
577579
-e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
578580
-e 's|{{TEST_LOGGER}}|$(or $(TEST_LOGGER),test$(COMMA)file)|g' \
579581
-e 's|{{TEST_TYPE}}|$(or $(TEST_TYPE),integration)|g' \

custom/conf/app.example.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,6 +1507,8 @@ LEVEL = Info
15071507
;; - manage_gpg_keys: a user cannot configure gpg keys
15081508
;; - manage_mfa: a user cannot configure mfa devices
15091509
;; - manage_credentials: a user cannot configure emails, passwords, or openid
1510+
;; - change_username: a user cannot change their username
1511+
;; - change_full_name: a user cannot change their full name
15101512
;;EXTERNAL_USER_DISABLE_FEATURES =
15111513

15121514
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1
331331

332332
replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0
333333

334-
replace github.com/nektos/act => gitea.com/gitea/act v0.259.1
334+
replace github.com/nektos/act => gitea.com/gitea/act v0.261.3
335335

336336
replace github.com/charmbracelet/git-lfs-transfer => gitea.com/gitea/git-lfs-transfer v0.2.0
337337

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
1616
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
1717
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 h1:cliQ4HHsCo6xi2oWZYKWW4bly/Ory9FuTpFPRxj/mAg=
1818
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078/go.mod h1:g/V2Hjas6Z1UHUp4yIx6bATpNzJ7DYtD0FG3+xARWxs=
19-
gitea.com/gitea/act v0.259.1 h1:8GG1o/xtUHl3qjn5f0h/2FXrT5ubBn05TJOM5ry+FBw=
20-
gitea.com/gitea/act v0.259.1/go.mod h1:UxZWRYqQG2Yj4+4OqfGWW5a3HELwejyWFQyU7F1jUD8=
19+
gitea.com/gitea/act v0.261.3 h1:BhiYpGJQKGq0XMYYICCYAN4KnsEWHyLbA6dxhZwFcV4=
20+
gitea.com/gitea/act v0.261.3/go.mod h1:Pg5C9kQY1CEA3QjthjhlrqOC/QOT5NyWNjOjRHw23Ok=
2121
gitea.com/gitea/git-lfs-transfer v0.2.0 h1:baHaNoBSRaeq/xKayEXwiDQtlIjps4Ac/Ll4KqLMB40=
2222
gitea.com/gitea/git-lfs-transfer v0.2.0/go.mod h1:UrXUCm3xLQkq15fu7qlXHUMlrhdlXHoi13KH2Dfiits=
2323
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed h1:EZZBtilMLSZNWtHHcgq2mt6NSGhJSZBuduAlinMEmso=

models/issues/pull_list.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type PullRequestsOptions struct {
2626
SortType string
2727
Labels []int64
2828
MilestoneID int64
29+
PosterID int64
2930
}
3031

3132
func listPullRequestStatement(ctx context.Context, baseRepoID int64, opts *PullRequestsOptions) *xorm.Session {
@@ -46,6 +47,10 @@ func listPullRequestStatement(ctx context.Context, baseRepoID int64, opts *PullR
4647
sess.And("issue.milestone_id=?", opts.MilestoneID)
4748
}
4849

50+
if opts.PosterID > 0 {
51+
sess.And("issue.poster_id=?", opts.PosterID)
52+
}
53+
4954
return sess
5055
}
5156

models/user/search.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,19 @@ func (opts *SearchUserOptions) toSearchQueryBase(ctx context.Context) *xorm.Sess
6565
builder.Like{"LOWER(full_name)", lowerKeyword},
6666
)
6767
if opts.SearchByEmail {
68-
keywordCond = keywordCond.Or(builder.Like{"LOWER(email)", lowerKeyword})
68+
var emailCond builder.Cond
69+
emailCond = builder.Like{"LOWER(email)", lowerKeyword}
70+
if opts.Actor == nil {
71+
emailCond = emailCond.And(builder.Eq{"keep_email_private": false})
72+
} else if !opts.Actor.IsAdmin {
73+
emailCond = emailCond.And(
74+
builder.Or(
75+
builder.Eq{"keep_email_private": false},
76+
builder.Eq{"id": opts.Actor.ID},
77+
),
78+
)
79+
}
80+
keywordCond = keywordCond.Or(emailCond)
6981
}
7082

7183
cond = cond.And(keywordCond)

modules/indexer/code/elasticsearch/elasticsearch.go

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
indexer_internal "code.gitea.io/gitea/modules/indexer/internal"
2121
inner_elasticsearch "code.gitea.io/gitea/modules/indexer/internal/elasticsearch"
2222
"code.gitea.io/gitea/modules/json"
23+
"code.gitea.io/gitea/modules/log"
2324
"code.gitea.io/gitea/modules/setting"
2425
"code.gitea.io/gitea/modules/timeutil"
2526
"code.gitea.io/gitea/modules/typesniffer"
@@ -197,8 +198,33 @@ func (b *Indexer) Index(ctx context.Context, repo *repo_model.Repository, sha st
197198
return nil
198199
}
199200

200-
// Delete deletes indexes by ids
201+
// Delete entries by repoId
201202
func (b *Indexer) Delete(ctx context.Context, repoID int64) error {
203+
if err := b.doDelete(ctx, repoID); err != nil {
204+
// Maybe there is a conflict during the delete operation, so we should retry after a refresh
205+
log.Warn("Deletion of entries of repo %v within index %v was erroneus. Trying to refresh index before trying again", repoID, b.inner.VersionedIndexName(), err)
206+
if err := b.refreshIndex(ctx); err != nil {
207+
return err
208+
}
209+
if err := b.doDelete(ctx, repoID); err != nil {
210+
log.Error("Could not delete entries of repo %v within index %v", repoID, b.inner.VersionedIndexName())
211+
return err
212+
}
213+
}
214+
return nil
215+
}
216+
217+
func (b *Indexer) refreshIndex(ctx context.Context) error {
218+
if _, err := b.inner.Client.Refresh(b.inner.VersionedIndexName()).Do(ctx); err != nil {
219+
log.Error("Error while trying to refresh index %v", b.inner.VersionedIndexName(), err)
220+
return err
221+
}
222+
223+
return nil
224+
}
225+
226+
// Delete entries by repoId
227+
func (b *Indexer) doDelete(ctx context.Context, repoID int64) error {
202228
_, err := b.inner.Client.DeleteByQuery(b.inner.VersionedIndexName()).
203229
Query(elastic.NewTermsQuery("repo_id", repoID)).
204230
Do(ctx)

modules/setting/admin.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@ const (
2929
UserFeatureManageGPGKeys = "manage_gpg_keys"
3030
UserFeatureManageMFA = "manage_mfa"
3131
UserFeatureManageCredentials = "manage_credentials"
32+
UserFeatureChangeUsername = "change_username"
33+
UserFeatureChangeFullName = "change_full_name"
3234
)

options/gitignore/KiCad

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ _autosave-*
1616
*-save.pro
1717
*-save.kicad_pcb
1818
fp-info-cache
19+
~*.lck
20+
\#auto_saved_files#
1921

2022
# Netlist files (exported from Eeschema)
2123
*.net
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
SENDMAIL OPEN SOURCE LICENSE
2+
3+
The following license terms and conditions apply to this open source
4+
software ("Software"), unless a different license is obtained directly
5+
from Sendmail, Inc. ("Sendmail") located at 6475 Christie Ave, Suite 350,
6+
Emeryville, CA 94608, USA.
7+
8+
Use, modification and redistribution (including distribution of any
9+
modified or derived work) of the Software in source and binary forms is
10+
permitted only if each of the following conditions of 1-6 are met:
11+
12+
1. Redistributions of the Software qualify as "freeware" or "open
13+
source software" under one of the following terms:
14+
15+
(a) Redistributions are made at no charge beyond the reasonable
16+
cost of materials and delivery; or
17+
18+
(b) Redistributions are accompanied by a copy of the modified
19+
Source Code (on an acceptable machine-readable medium) or by an
20+
irrevocable offer to provide a copy of the modified Source Code
21+
(on an acceptable machine-readable medium) for up to three years
22+
at the cost of materials and delivery. Such redistributions must
23+
allow further use, modification, and redistribution of the Source
24+
Code under substantially the same terms as this license. For
25+
the purposes of redistribution "Source Code" means the complete
26+
human-readable, compilable, linkable, and operational source
27+
code of the redistributed module(s) including all modifications.
28+
29+
2. Redistributions of the Software Source Code must retain the
30+
copyright notices as they appear in each Source Code file, these
31+
license terms and conditions, and the disclaimer/limitation of
32+
liability set forth in paragraph 6 below. Redistributions of the
33+
Software Source Code must also comply with the copyright notices
34+
and/or license terms and conditions imposed by contributors on
35+
embedded code. The contributors' license terms and conditions
36+
and/or copyright notices are contained in the Source Code
37+
distribution.
38+
39+
3. Redistributions of the Software in binary form must reproduce the
40+
Copyright Notice described below, these license terms and conditions,
41+
and the disclaimer/limitation of liability set forth in paragraph
42+
6 below, in the documentation and/or other materials provided with
43+
the binary distribution. For the purposes of binary distribution,
44+
"Copyright Notice" refers to the following language: "Copyright (c)
45+
1998-2009 Sendmail, Inc. All rights reserved."
46+
47+
4. Neither the name, trademark or logo of Sendmail, Inc. (including
48+
without limitation its subsidiaries or affiliates) or its contributors
49+
may be used to endorse or promote products, or software or services
50+
derived from this Software without specific prior written permission.
51+
The name "sendmail" is a registered trademark and service mark of
52+
Sendmail, Inc.
53+
54+
5. We reserve the right to cancel this license if you do not comply with
55+
the terms. This license is governed by California law and both of us
56+
agree that for any dispute arising out of or relating to this Software,
57+
that jurisdiction and venue is proper in San Francisco or Alameda
58+
counties. These license terms and conditions reflect the complete
59+
agreement for the license of the Software (which means this supercedes
60+
prior or contemporaneous agreements or representations). If any term
61+
or condition under this license is found to be invalid, the remaining
62+
terms and conditions still apply.
63+
64+
6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY
65+
SENDMAIL AND ITS CONTRIBUTORS "AS IS" WITHOUT WARRANTY OF ANY KIND
66+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
67+
IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A
68+
PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. IN NO EVENT SHALL SENDMAIL
69+
OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
70+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
71+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
72+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
73+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
74+
WITHOUT LIMITATION NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
75+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

options/license/harbour-exception

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
As a special exception, the Harbour Project gives permission for
2+
additional uses of the text contained in its release of Harbour.
3+
4+
The exception is that, if you link the Harbour libraries with other
5+
files to produce an executable, this does not by itself cause the
6+
resulting executable to be covered by the GNU General Public License.
7+
Your use of that executable is in no way restricted on account of
8+
linking the Harbour library code into it.
9+
10+
This exception does not however invalidate any other reasons why
11+
the executable file might be covered by the GNU General Public License.
12+
13+
This exception applies only to the code released by the Harbour
14+
Project under the name Harbour. If you copy code from other
15+
Harbour Project or Free Software Foundation releases into a copy of
16+
Harbour, as the General Public License permits, the exception does
17+
not apply to the code that you add in this way. To avoid misleading
18+
anyone as to the status of such modified files, you must delete
19+
this exception notice from them.
20+
21+
If you write modifications of your own for Harbour, it is your choice
22+
whether to permit this exception to apply to your modifications.
23+
If you do not wish that, delete this exception notice.

options/locale/locale_cs-CZ.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,6 @@ public_profile=Veřejný profil
689689
biography_placeholder=Řekněte nám něco o sobě! (Můžete použít Markdown)
690690
location_placeholder=Sdílejte svou přibližnou polohu s ostatními
691691
profile_desc=Nastavte, jak bude váš profil zobrazen ostatním uživatelům. Vaše hlavní e-mailová adresa bude použita pro oznámení, obnovení hesla a operace Git.
692-
password_username_disabled=Externí uživatelé nemohou měnit svoje uživatelské jméno. Kontaktujte prosím svého administrátora pro více detailů.
693692
full_name=Celé jméno
694693
website=Web
695694
location=Místo

options/locale/locale_de-DE.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,6 @@ public_profile=Öffentliches Profil
683683
biography_placeholder=Erzähle uns ein wenig über Dich selbst! (Du kannst Markdown verwenden)
684684
location_placeholder=Teile Deinen ungefähren Standort mit anderen
685685
profile_desc=Lege fest, wie dein Profil anderen Benutzern angezeigt wird. Deine primäre E-Mail-Adresse wird für Benachrichtigungen, Passwort-Wiederherstellung und webbasierte Git-Operationen verwendet.
686-
password_username_disabled=Benutzer, die nicht von Gitea verwaltet werden können ihren Benutzernamen nicht ändern. Bitte kontaktiere deinen Administrator für mehr Details.
687686
full_name=Vollständiger Name
688687
website=Webseite
689688
location=Standort

options/locale/locale_el-GR.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,6 @@ public_profile=Δημόσιο Προφίλ
620620
biography_placeholder=Πείτε μας λίγο για τον εαυτό σας! (Μπορείτε να γράψετε με Markdown)
621621
location_placeholder=Μοιραστείτε την κατά προσέγγιση τοποθεσία σας με άλλους
622622
profile_desc=Ελέγξτε πώς εμφανίζεται το προφίλ σας σε άλλους χρήστες. Η κύρια διεύθυνση email σας θα χρησιμοποιηθεί για ειδοποιήσεις, ανάκτηση κωδικού πρόσβασης και λειτουργίες Git που βασίζονται στο web.
623-
password_username_disabled=Οι μη τοπικοί χρήστες δεν επιτρέπεται να αλλάξουν το όνομα χρήστη τους. Επικοινωνήστε με το διαχειριστή σας για περισσότερες λεπτομέρειες.
624623
full_name=Πλήρες Όνομα
625624
website=Ιστοσελίδα
626625
location=Τοποθεσία

options/locale/locale_en-US.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ lang_select_error = Select a language from the list.
580580
581581
username_been_taken = The username is already taken.
582582
username_change_not_local_user = Non-local users are not allowed to change their username.
583+
change_username_disabled = Changing username is disabled.
584+
change_full_name_disabled = Changing full name is disabled.
583585
username_has_not_been_changed = Username has not been changed
584586
repo_name_been_taken = The repository name is already used.
585587
repository_force_private = Force Private is enabled: private repositories cannot be made public.
@@ -705,7 +707,8 @@ public_profile = Public Profile
705707
biography_placeholder = Tell us a little bit about yourself! (You can use Markdown)
706708
location_placeholder = Share your approximate location with others
707709
profile_desc = Control how your profile is show to other users. Your primary email address will be used for notifications, password recovery and web-based Git operations.
708-
password_username_disabled = Non-local users are not allowed to change their username. Please contact your site administrator for more details.
710+
password_username_disabled = You are not allowed to change their username. Please contact your site administrator for more details.
711+
password_full_name_disabled = You are not allowed to change their full name. Please contact your site administrator for more details.
709712
full_name = Full Name
710713
website = Website
711714
location = Location

options/locale/locale_es-ES.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ public_profile=Perfil público
617617
biography_placeholder=¡Cuéntanos un poco sobre ti mismo! (Puedes usar Markdown)
618618
location_placeholder=Comparte tu ubicación aproximada con otros
619619
profile_desc=Controla cómo se muestra su perfil a otros usuarios. Tu dirección de correo electrónico principal se utilizará para notificaciones, recuperación de contraseña y operaciones de Git basadas en la web.
620-
password_username_disabled=Usuarios no locales no tienen permitido cambiar su nombre de usuario. Por favor, contacta con el administrador del sistema para más detalles.
621620
full_name=Nombre completo
622621
website=Página web
623622
location=Localización

options/locale/locale_fa-IR.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,6 @@ account_link=حساب‌های مرتبط
491491
organization=سازمان ها
492492

493493
public_profile=نمایه عمومی
494-
password_username_disabled=حساب‌های غیر محلی مجاز به تغییر نام کاربری نیستند. لطفا با مدیر سایت در ارتباط باشید.
495494
full_name=نام کامل
496495
website=تارنما
497496
location=موقعیت مکانی

options/locale/locale_fi-FI.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ account_link=Linkitetyt tilit
451451
organization=Organisaatiot
452452

453453
public_profile=Julkinen profiili
454-
password_username_disabled=Ei-paikalliset käyttäjät eivät voi muuttaa käyttäjätunnustaan. Ole hyvä ja ota yhteyttä sivuston ylläpitäjään saadaksesi lisätietoa.
455454
full_name=Kokonimi
456455
website=Nettisivut
457456
location=Sijainti

options/locale/locale_fr-FR.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ public_profile=Profil public
705705
biography_placeholder=Parlez-nous un peu de vous ! (Vous pouvez utiliser Markdown)
706706
location_placeholder=Partagez votre position approximative avec d'autres personnes
707707
profile_desc=Contrôlez comment votre profil est affiché aux autres utilisateurs. Votre adresse courriel principale sera utilisée pour les notifications, la récupération de mot de passe et les opérations Git basées sur le Web.
708-
password_username_disabled=Les utilisateurs externes ne sont pas autorisés à modifier leur nom d'utilisateur. Veuillez contacter l'administrateur de votre site pour plus de détails.
709708
full_name=Nom complet
710709
website=Site Web
711710
location=Localisation

0 commit comments

Comments
 (0)