Skip to content

Commit e87dea4

Browse files
authored
Merge branch 'main' into main
2 parents d677ee8 + a008486 commit e87dea4

File tree

131 files changed

+5370
-7264
lines changed

Some content is hidden

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

131 files changed

+5370
-7264
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ cpu.out
7878
/public/assets/css
7979
/public/assets/fonts
8080
/public/assets/img/avatar
81-
/public/assets/img/webpack
8281
/vendor
8382
/web_src/fomantic/node_modules
8483
/web_src/fomantic/build/*

.eslintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ reportUnusedDisableDirectives: true
33

44
ignorePatterns:
55
- /web_src/js/vendor
6+
- /web_src/fomantic
67

78
parserOptions:
89
sourceType: module

.github/labeler.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ modifies/docs:
44
- "**/*.md"
55
- "docs/**"
66

7-
modifies/frontend:
8-
- changed-files:
9-
- any-glob-to-any-file:
10-
- "web_src/**"
11-
- "tailwind.config.js"
12-
- "webpack.config.js"
13-
147
modifies/templates:
158
- changed-files:
169
- all-globs-to-any-file:
@@ -53,7 +46,7 @@ modifies/internal:
5346
- ".gitpod.yml"
5447
- ".markdownlint.yaml"
5548
- ".spectral.yaml"
56-
- ".stylelintrc.yaml"
49+
- "stylelint.config.js"
5750
- ".yamllint.yaml"
5851
- ".github/**"
5952
- ".gitea/"

.github/workflows/cron-translations.yml

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@ jobs:
1111
if: github.repository == 'go-gitea/gitea'
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: download from crowdin
15-
uses: docker://jonasfranz/crowdin
14+
- uses: crowdin/github-action@v1
15+
with:
16+
upload_sources: true
17+
upload_translations: false
18+
download_sources: false
19+
download_translations: true
20+
push_translations: false
21+
push_sources: false
22+
create_pull_request: false
23+
config: crowdin.yml
1624
env:
25+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
1726
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
18-
PLUGIN_DOWNLOAD: true
19-
PLUGIN_EXPORT_DIR: options/locale/
20-
PLUGIN_IGNORE_BRANCH: true
21-
PLUGIN_PROJECT_IDENTIFIER: gitea
2227
- name: update locales
2328
run: ./build/update-locales.sh
2429
- name: push translations to repo
@@ -31,19 +36,3 @@ jobs:
3136
commit_message: "[skip ci] Updated translations via Crowdin"
3237
remote: "[email protected]:go-gitea/gitea.git"
3338
ssh_key: ${{ secrets.DEPLOY_KEY }}
34-
crowdin-push:
35-
runs-on: ubuntu-latest
36-
if: github.repository == 'go-gitea/gitea'
37-
steps:
38-
- uses: actions/checkout@v4
39-
- name: push translations to crowdin
40-
uses: docker://jonasfranz/crowdin
41-
env:
42-
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
43-
PLUGIN_UPLOAD: true
44-
PLUGIN_EXPORT_DIR: options/locale/
45-
PLUGIN_IGNORE_BRANCH: true
46-
PLUGIN_PROJECT_IDENTIFIER: gitea
47-
PLUGIN_FILES: |
48-
locale_en-US.ini: options/locale/locale_en-US.ini
49-
PLUGIN_BRANCH: main

.github/workflows/files-changed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- "package-lock.json"
5959
- "Makefile"
6060
- ".eslintrc.yaml"
61-
- ".stylelintrc.yaml"
61+
- "stylelint.config.js"
6262
- ".npmrc"
6363
6464
docs:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ cpu.out
7777
/public/assets/css
7878
/public/assets/fonts
7979
/public/assets/licenses.txt
80-
/public/assets/img/webpack
8180
/vendor
8281
/web_src/fomantic/node_modules
8382
/web_src/fomantic/build/*

.ignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
/modules/options/bindata.go
55
/modules/public/bindata.go
66
/modules/templates/bindata.go
7-
/vendor
7+
/options/gitignore
8+
/options/license
89
/public/assets
10+
/vendor
911
node_modules

.stylelintrc.yaml

Lines changed: 0 additions & 223 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ FOMANTIC_WORK_DIR := web_src/fomantic
119119
WEBPACK_SOURCES := $(shell find web_src/js web_src/css -type f)
120120
WEBPACK_CONFIGS := webpack.config.js tailwind.config.js
121121
WEBPACK_DEST := public/assets/js/index.js public/assets/css/index.css
122-
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts public/assets/img/webpack
122+
WEBPACK_DEST_ENTRIES := public/assets/js public/assets/css public/assets/fonts
123123

124124
BINDATA_DEST := modules/public/bindata.go modules/options/bindata.go modules/templates/bindata.go
125125
BINDATA_HASH := $(addsuffix .hash,$(BINDATA_DEST))

crowdin.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
project_id_env: CROWDIN_PROJECT_ID
2+
api_token_env: CROWDIN_KEY
3+
base_path: "."
4+
base_url: "https://api.crowdin.com"
5+
preserve_hierarchy: true
6+
files:
7+
- source: "/options/locale/locale_en-US.ini"
8+
translation: "/options/locale/locale_%locale%.ini"
9+
type: "ini"
10+
skip_untranslated_strings: true
11+
export_only_approved: true
12+
update_option: "update_as_unapproved"

custom/conf/app.example.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,11 @@ LEVEL = Info
14851485
;; - manage_ssh_keys: a user cannot configure ssh keys
14861486
;; - manage_gpg_keys: a user cannot configure gpg keys
14871487
;USER_DISABLED_FEATURES =
1488+
;; Comma separated list of disabled features ONLY if the user has an external login type (eg. LDAP, Oauth, etc.), could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys`. This setting is independent from `USER_DISABLED_FEATURES` and supplements its behavior.
1489+
;; - deletion: a user cannot delete their own account
1490+
;; - manage_ssh_keys: a user cannot configure ssh keys
1491+
;; - manage_gpg_keys: a user cannot configure gpg keys
1492+
;;EXTERNAL_USER_DISABLE_FEATURES =
14881493

14891494
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14901495
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,10 @@ And the following unique queues:
522522
- `deletion`: User cannot delete their own account.
523523
- `manage_ssh_keys`: User cannot configure ssh keys.
524524
- `manage_gpg_keys`: User cannot configure gpg keys.
525+
- `EXTERNAL_USER_DISABLE_FEATURES`: **_empty_**: Comma separated list of disabled features ONLY if the user has an external login type (eg. LDAP, Oauth, etc.), could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys`. This setting is independent from `USER_DISABLED_FEATURES` and supplements its behavior.
526+
- `deletion`: User cannot delete their own account.
527+
- `manage_ssh_keys`: User cannot configure ssh keys.
528+
- `manage_gpg_keys`: User cannot configure gpg keys.
525529

526530
## Security (`security`)
527531

models/asymkey/gpg_key_verify.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ func VerifyGPGKey(ctx context.Context, ownerID int64, keyID, token, signature st
4646
return "", ErrGPGKeyNotExist{}
4747
}
4848

49+
if err := key.LoadSubKeys(ctx); err != nil {
50+
return "", err
51+
}
52+
4953
sig, err := extractSignature(signature)
5054
if err != nil {
5155
return "", ErrGPGInvalidTokenSignature{

0 commit comments

Comments
 (0)