Skip to content

Commit 3420d76

Browse files
committed
Merge remote-tracking branch 'upstream/main' into locale-cleanup
2 parents 9fc1cee + c660149 commit 3420d76

File tree

346 files changed

+7262
-2209
lines changed

Some content is hidden

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

346 files changed

+7262
-2209
lines changed

.github/workflows/pull-compliance.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v4
35-
- uses: actions/setup-python@v4
35+
- uses: actions/setup-python@v5
3636
with:
37-
python-version: "3.11"
37+
python-version: "3.12"
3838
- run: pip install poetry
3939
- run: make deps-py
4040
- run: make lint-templates
@@ -45,9 +45,9 @@ jobs:
4545
runs-on: ubuntu-latest
4646
steps:
4747
- uses: actions/checkout@v4
48-
- uses: actions/setup-python@v4
48+
- uses: actions/setup-python@v5
4949
with:
50-
python-version: "3.11"
50+
python-version: "3.12"
5151
- run: pip install poetry
5252
- run: make deps-py
5353
- run: make lint-yaml

.stylelintrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ rules:
6464
"@stylistic/media-query-list-comma-newline-before": null
6565
"@stylistic/media-query-list-comma-space-after": null
6666
"@stylistic/media-query-list-comma-space-before": null
67+
"@stylistic/named-grid-areas-alignment": null
6768
"@stylistic/no-empty-first-line": null
6869
"@stylistic/no-eol-whitespace": true
6970
"@stylistic/no-extra-semicolons": true

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ We assume in good faith that the information you provide is legally binding.
464464
We adopted a release schedule to streamline the process of working on, finishing, and issuing releases. \
465465
The overall goal is to make a major release every three or four months, which breaks down into two or three months of general development followed by one month of testing and polishing known as the release freeze. \
466466
All the feature pull requests should be
467-
merged before feature freeze. And, during the frozen period, a corresponding
467+
merged before feature freeze. All feature pull requests haven't been merged before this feature freeze will be moved to next milestone, please notice our feature freeze announcement on discord. And, during the frozen period, a corresponding
468468
release branch is open for fixes backported from main branch. Release candidates
469469
are made during this period for user testing to
470470
obtain a final version that is maintained in this branch.

cmd/admin_regenerate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
package cmd
55

66
import (
7-
asymkey_model "code.gitea.io/gitea/models/asymkey"
87
"code.gitea.io/gitea/modules/graceful"
8+
asymkey_service "code.gitea.io/gitea/services/asymkey"
99
repo_service "code.gitea.io/gitea/services/repository"
1010

1111
"github.com/urfave/cli/v2"
@@ -42,5 +42,5 @@ func runRegenerateKeys(_ *cli.Context) error {
4242
if err := initDB(ctx); err != nil {
4343
return err
4444
}
45-
return asymkey_model.RewriteAllPublicKeys(ctx)
45+
return asymkey_service.RewriteAllPublicKeys(ctx)
4646
}

contrib/systemd/gitea.service

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[Unit]
22
Description=Gitea (Git with a cup of tea)
3-
After=syslog.target
43
After=network.target
54
###
65
# Don't forget to add the database service dependencies

custom/conf/app.example.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,8 +1480,10 @@ LEVEL = Info
14801480
;;
14811481
;; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
14821482
;DEFAULT_EMAIL_NOTIFICATIONS = enabled
1483-
;; Disabled features for users, could be "deletion", more features can be disabled in future
1483+
;; Disabled features for users, could be "deletion", "manage_ssh_keys","manage_gpg_keys" more features can be disabled in future
14841484
;; - deletion: a user cannot delete their own account
1485+
;; - manage_ssh_keys: a user cannot configure ssh keys
1486+
;; - manage_gpg_keys: a user cannot configure gpg keys
14851487
;USER_DISABLED_FEATURES =
14861488

14871489
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,10 @@ And the following unique queues:
518518

519519
- `DEFAULT_EMAIL_NOTIFICATIONS`: **enabled**: Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled
520520
- `DISABLE_REGULAR_ORG_CREATION`: **false**: Disallow regular (non-admin) users from creating organizations.
521-
- `USER_DISABLED_FEATURES`: **_empty_** Disabled features for users, could be `deletion` and more features can be added in future.
521+
- `USER_DISABLED_FEATURES`: **_empty_** Disabled features for users, could be `deletion`, `manage_ssh_keys`, `manage_gpg_keys` and more features can be added in future.
522522
- `deletion`: User cannot delete their own account.
523+
- `manage_ssh_keys`: User cannot configure ssh keys.
524+
- `manage_gpg_keys`: User cannot configure gpg keys.
523525

524526
## Security (`security`)
525527

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,10 @@ Gitea 创建以下非唯一队列:
497497

498498
- `DEFAULT_EMAIL_NOTIFICATIONS`: **enabled**:用户电子邮件通知的默认配置(用户可配置)。选项:enabled、onmention、disabled
499499
- `DISABLE_REGULAR_ORG_CREATION`: **false**:禁止普通(非管理员)用户创建组织。
500-
- `USER_DISABLED_FEATURES`:**_empty_** 禁用的用户特性,当前允许为空或者 `deletion`, 未来可以增加更多设置。
500+
- `USER_DISABLED_FEATURES`:**_empty_** 禁用的用户特性,当前允许为空或者 `deletion``manage_ssh_keys``manage_gpg_keys` 未来可以增加更多设置。
501501
- `deletion`: 用户不能通过界面或者API删除他自己。
502+
- `manage_ssh_keys`: 用户不能通过界面或者API配置SSH Keys。
503+
- `manage_gpg_keys`: 用户不能配置 GPG 密钥。
502504

503505
## 安全性 (`security`)
504506

docs/content/administration/mail-templates.en-us.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Please check [Gitea's logs](administration/logging-config.md) for error messages
224224
{{if not (eq .Body "")}}
225225
<h3>Message content</h3>
226226
<hr>
227-
{{.Body | SanitizeHTML}}
227+
{{.Body}}
228228
{{end}}
229229
</p>
230230
<hr>
@@ -259,14 +259,14 @@ This template produces something along these lines:
259259
The template system contains several functions that can be used to further process and format
260260
the messages. Here's a list of some of them:
261261

262-
| Name | Parameters | Available | Usage |
263-
| ---------------- | ----------- | --------- |-----------------------------------------------------------------------------|
264-
| `AppUrl` | - | Any | Gitea's URL |
265-
| `AppName` | - | Any | Set from `app.ini`, usually "Gitea" |
266-
| `AppDomain` | - | Any | Gitea's host name |
267-
| `EllipsisString` | string, int | Any | Truncates a string to the specified length; adds ellipsis as needed |
268-
| `SanitizeHTML` | string | Body only | Sanitizes text by removing any dangerous HTML tags from it. |
269-
| `SafeHTML` | string | Body only | Takes the input as HTML; can be used for `.ReviewComments.RenderedContent`. |
262+
| Name | Parameters | Available | Usage |
263+
| ---------------- | ----------- | --------- | ------------------------------------------------------------------- |
264+
| `AppUrl` | - | Any | Gitea's URL |
265+
| `AppName` | - | Any | Set from `app.ini`, usually "Gitea" |
266+
| `AppDomain` | - | Any | Gitea's host name |
267+
| `EllipsisString` | string, int | Any | Truncates a string to the specified length; adds ellipsis as needed |
268+
| `SanitizeHTML` | string | Body only | Sanitizes text by removing any dangerous HTML tags from it |
269+
| `SafeHTML` | string | Body only | Takes the input as HTML, can be used for outputing raw HTML content |
270270

271271
These are _functions_, not metadata, so they have to be used:
272272

docs/content/administration/mail-templates.zh-cn.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ _主题_ 和 _邮件正文_ 由 [Golang的模板引擎](https://go.dev/pkg/text/
207207
{{if not (eq .Body "")}}
208208
<h3>消息内容:</h3>
209209
<hr>
210-
{{.Body | SanitizeHTML}}
210+
{{.Body}}
211211
{{end}}
212212
</p>
213213
<hr>
@@ -242,14 +242,14 @@ _主题_ 和 _邮件正文_ 由 [Golang的模板引擎](https://go.dev/pkg/text/
242242

243243
模板系统包含一些函数,可用于进一步处理和格式化消息。以下是其中一些函数的列表:
244244

245-
| 函数名 | 参数 | 可用于 | 用法 |
246-
|------------------| ----------- | ------------ |---------------------------------------------------------|
247-
| `AppUrl` | - | 任何地方 | Gitea 的 URL |
248-
| `AppName` | - | 任何地方 |`app.ini` 中设置,通常为 "Gitea" |
249-
| `AppDomain` | - | 任何地方 | Gitea 的主机名 |
250-
| `EllipsisString` | string, int | 任何地方 | 将字符串截断为指定长度;根据需要添加省略号 |
251-
| `SanitizeHTML` | string | 仅正文部分 | 通过删除其中的危险 HTML 标签对文本进行清理 |
252-
| `SafeHTML` | string | 仅正文部分 | 将输入作为 HTML 处理;可用于 `.ReviewComments.RenderedContent` 等字段 |
245+
| 函数名 | 参数 | 可用于 | 用法 |
246+
|------------------| ----------- | ------------ | ------------------------------ |
247+
| `AppUrl` | - | 任何地方 | Gitea 的 URL |
248+
| `AppName` | - | 任何地方 |`app.ini` 中设置,通常为 "Gitea" |
249+
| `AppDomain` | - | 任何地方 | Gitea 的主机名 |
250+
| `EllipsisString` | string, int | 任何地方 | 将字符串截断为指定长度;根据需要添加省略号 |
251+
| `SanitizeHTML` | string | 仅正文部分 | 通过删除其中的危险 HTML 标签对文本进行清理 |
252+
| `SafeHTML` | string | 仅正文部分 | 将输入作为 HTML 处理;可用于输出原始的 HTML 内容 |
253253

254254
这些都是 _函数_,而不是元数据,因此必须按以下方式使用:
255255

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
date: "2024-01-31T00:00:00+00:00"
3+
title: "Blocking a user"
4+
slug: "blocking-user"
5+
sidebar_position: 25
6+
toc: false
7+
draft: false
8+
aliases:
9+
- /en-us/webhooks
10+
menu:
11+
sidebar:
12+
parent: "usage"
13+
name: "Blocking a user"
14+
sidebar_position: 30
15+
identifier: "blocking-user"
16+
---
17+
18+
# Blocking a user
19+
20+
Gitea supports blocking of users to restrict how they can interact with you and your content.
21+
22+
You can block a user in your account settings, from the user's profile or from comments created by the user.
23+
The user is not directly notified about the block, but they can notice they are blocked when they attempt to interact with you.
24+
Organization owners can block anyone who is not a member of the organization too.
25+
If a blocked user has admin permissions, they can still perform all actions even if blocked.
26+
27+
### When you block a user
28+
29+
- the user stops following you
30+
- you stop following the user
31+
- the user's stars are removed from your repositories
32+
- your stars are removed from their repositories
33+
- the user stops watching your repositories
34+
- you stop watching their repositories
35+
- the user's issue assignments are removed from your repositories
36+
- your issue assignments are removed from their repositories
37+
- the user is removed as a collaborator on your repositories
38+
- you are removed as a collaborator on their repositories
39+
- any pending repository transfers to or from the blocked user are canceled
40+
41+
### When you block a user, the user cannot
42+
43+
- follow you
44+
- watch your repositories
45+
- star your repositories
46+
- fork your repositories
47+
- transfer repositories to you
48+
- open issues or pull requests on your repositories
49+
- comment on issues or pull requests you've created
50+
- comment on issues or pull requests on your repositories
51+
- react to your comments on issues or pull requests
52+
- react to comments on issues or pull requests on your repositories
53+
- assign you to issues or pull requests
54+
- add you as a collaborator on their repositories
55+
- send you notifications by @mentioning your username
56+
- be added as team member (if blocked by an organization)

0 commit comments

Comments
 (0)