存取控制

Weblate 具有一個精細的權限系統,可以為整個實例或在有限範圍內分配使用者權限。

專案存取控制

備註

在託管的 Weblate 上使用免費 Libre 方案的專案都會被設定為 公開 的。如果你想限制對你專案的存取,可以切換到付費方案。

You can limit user’s access to individual projects by selecting a different 存取控制 setting. Available options are:

Public

任何人都看得到。

任何通過身份驗證的使用者都可以貢獻。

所有人都可能可以存取VCS 儲存庫。

Choose this for open-source projects, or when your Weblate instance is private or locked-down.

Protected

任何人都看得到。

只有選定的使用者可以貢獻。

只有選定的使用者可以存取 VCS 儲存庫。

Choose this to gain visibility, but still have control over who can contribute.

Private

只有選定的使用者看得到。

只有選定的使用者可以貢獻。

只有選定的使用者可以存取 VCS 儲存庫。

Choose this for projects that should not be exposed publicly at all.

Custom

只有選定的使用者看得到。

只有選定的使用者可以貢獻。

只有選定的使用者可以存取 VCS 儲存庫。

Not available on Hosted Weblate.

You will have to set up all the permissions using Site-wide access control.

如果您想以一種特定的、精細定制的通道定義訪問,請在你自己的Weblate實例上選擇這個。

可以在每個專案的組態(:guilabel:`Manage↓:guilabel:`Settings)的:guilabel:`Access`選項卡中更改存取控制。

../_images/project-access.webp

可以透過 DEFAULT_ACCESS_CONTROL 修改預設值。

備註

即使對於 Private 專案,也會公開有關專案的一些資訊:儘管具有存取控制設定,所有專案的計數都會包含在整個實例的統計資訊和語言摘要裡面。您的專案名稱和其他資訊不會揭露。

備註

專案中預設提供“公開”,”受保護”,及“私有”的使用者權限組合, Weblate的實例管理員也可以使用:ref:`custom settings <custom-acl>`進行客製化.

也參考

存取控制

管理單一專案的存取控制

Manage project access 特權的使用者(請參見 List of privileges )可以管理專案內的使用者,透過將他們加入到專案內。初始的團隊由 Weblate 系統建立,但額外新增的可以被定義提供更多較仔細的存取控制。您可以限制團隊翻譯的語言與指派已定義的角色(參閱: List of privileges)。

以下的團隊將隨著每一專案自動建立:

於`公開`、`保護`與`隱私`專案:

管理

包含此專案所有可使用的權限。

審核 (僅限 :ref:`review workflow <reviews>`設定為開啟)

可以在復查時批准翻譯。

只限‘受保護’及‘私有’專案:

翻譯

可以翻譯專案,並將離線的翻譯上傳。

原文

可以編輯來源字串 (如果在 project settings 中允許的話 )及來源字串資訊。

語言

可以管理已翻譯的語言(新增或移除翻譯字串)。

詞彙表

可以管理字典檔(新增或移除專案與上傳)。

記憶

可以管理翻譯記憶。

螢幕擷圖

可以管理截圖(新增或移除他們或與來源文字作關聯)。

自動翻譯

可以使用自動翻譯。

VCS

可以管理 VCS 並存取匯出的儲存庫。

帳單

可以存取帳單資訊和設定(請參見 帳單 )。

../_images/manage-users.webp

這些功能可在 Access control 頁面上找到,頁面存取路徑為專案 menu ManageUsers

團隊管理員

Added in version 4.15.

每一團隊可以擁有團隊的管理員,他可以新增或移除團隊中的成員。對於想要建立自治的團隊是很有用的。

Inviting new users

Adding existing users will send them invitation to confirm. With REGISTRATION_OPEN the administrator can also invite new users using e-mail. Invited users have to complete the registration process to get access to the project.

It is not required to have any site-wide privileges in order to do so, access management permission on the project’s scope (e.g. a membership in the Administration team) would be sufficient.

提示

If the invited user missed the validity of the invitation, a new invitation has to be created.

同樣的邀請函數可以從 管理界面 :guilabel:`使用者`標籤。

在 5.0 版的變更: Weblate now does not automatically create accounts or add users to the teams. This is only done after confirmation from the user.

禁用使用者

Added in version 4.7.

避免一些行為惡意的使用者在您的專案中,您可以限制他們貢獻。被限制的使用者若有權限依舊能看到專案,但是他不能做出貢獻。

單一專案權限管理

You can set your projects to Protected or Private (see 專案存取控制), and manage users per-project in the Weblate user interface.

預設情況下,這可以防止 Weblate 授權 UsersViewers 提供 default teams 由於這些團隊所擁有的設定。這不會阻止您透過更改預設團隊,為預設團隊建立新的一個專案,或者為以下單個元件建立其他自定義設定,或者如 Site-wide access control 所描述。

其中一個透過 Weblate 使用者介面管理權限的主要好處是,您可以將其委派給其他使用者,而不需要給予他們超級使用者權限。為了這樣做,請將他們加入專案的 Administration 團隊。

Site-wide access control

備註

This feature is unavailable on Hosted Weblate.

權限系統基於團隊和角色,其中角色定義一組權限,團隊將其與使用者和翻譯相關聯。參閱 使用者,角色,團隊與權限 瞭解更多資訊。

The most powerful features of the Weblate’s access control system can be configured in the 管理介面. You can use it to manage permissions of any project. You don’t necessarily have to switch it to Custom access control to utilize it. However you must have superuser privileges in order to use it.

If you are not interested in details of implementation, and just want to create a simple-enough configuration based on the defaults, or don’t have a site-wide access to the whole Weblate installation (like on Hosted Weblate), please refer to the 管理單一專案的存取控制 section.

網站範圍內的權限管理

要一次管理整個執行個體的權限,請將使用者新增到合適的 default teams:

  • 使用者 (預設完成於經由 automatic team assignment)。

  • `審稿人員(如果您使用的是:ref:“評論工作流程<評論>”與專用評論者)。

  • “經理”(如果您想將大多數管理操作委派給其他人)。

您應該使所有專案設定為 公開`(請參見 :ref:`acl),否則網站層級的權限將對 使用者檢閱者 不會有任何影響。

您還可以賦予您所選擇的一些額外權限到預設群組。例如,您可能希望允許管理所有 使用者 的螢幕截圖。

您也可以定義一些新的自定義團隊。如果您想繼續管理這些團隊的網站範圍內的權限,請選擇適當的 Project selection (如 All projectsAll public projects )。

為語言、元件或專案自訂權限

您可以建立自己的專用團隊來管理不同對象(如語言,元件和專案)的權限。您不能透過新增一組自定義的團隊來撤銷任何來自全站設定的權限或某一團隊的權限,即使這些團隊只能授予額外的權限。

示例:

如果您想要(無論出於何種原因)允許翻譯到特定語言(讓我們說“捷克語”)僅在一組封閉式的可靠翻譯器,同時保持翻譯到其他語言公眾,您將不得不:

  1. 從所有使用者中刪除翻譯 捷克語 的權限。在預設組態中,可以透過修改 使用者 來完成此操作 default team

    群組 使用者

    語言選取

    如定義

    語言

    捷克語 以外

  1. 捷克語 翻譯新增專門組別。

    捷克語 翻譯群組

    角色

    超級使用者

    專案選取

    所有公開專案

    語言選取

    如定義

    語言

    捷克語

  1. 新增團隊中您希望賦予權限的使用者。

正如您所看到的,這種方式的權限管理是強大的,但可能是相當繁瑣的工作。除非授予超級使用者權限,否則您無法將其委派給另一個使用者。

使用者,角色,團隊與權限

身份驗證模型包括幾個對象:

許可

Weblate 定義的個人權限。權限不能分配給使用者。這只能透過分配角色來完成。

角色

角色定義為一組權限。這允許在幾個地方重複使用這些組,使管理更容易。

使用者

使用者可隸屬於許多個團隊。

群組

使用者組連接角色、使用者和身份驗證對象(專案、語言和元件列表)。

graph auth { "User" -- "Group"; "Group" -- "Role"; "Role" -- "Permission"; "Group" -- "Project"; "Group" -- "Language"; "Group" -- "Components"; "Group" -- "Component list"; }

備註

一個團隊可以沒有分配角色,在這種情況下,假設任何人能存取專案(見下文)。

專案的瀏覽權限

使用者必須為團隊成員並團隊連結到專案或任何元件的成員。擁有成員身份就足夠了,瀏覽專案不需要特定的權限(這被用於預設的 檢視者 小組,見 default-groups )。

元件的瀏覽權限

使用者一旦能夠存取元件的專案,就可以不受限制地訪問元件。 (並將擁有該專案授予使用者的所有權限)。在開啟 受限制的存取 的情況下,存取元件需要對該元件(或該元件所在的元件列表)具有顯式權限。

團隊範圍

The scope of the permission assigned by the roles in the teams are applied by the following rules:

  • 如果團隊指定任何 Component list,所有在團隊已賦予到成員的權限也將賦權在團隊裡元件列表中的所有元件。若無額外指定的權限在所有的專案,這些元件在 ComponentsProjects 會被忽略。

    Using huge component lists might have a performance impact, please consider giving access via projects instead.

  • 如果該團隊指定任何元件,則為將該團隊的成員提供給團隊的所有元件,對於該團隊的所有元件授予所有權限,並且對於這些元件的所有專案授予沒有額外權限的存取權限。專案被忽略。

  • Otherwise, if the team specifies any Projects, either by directly listing them or by having Projects selection set to a value like All public projects, all those permissions are applied to all the projects, which effectively grants the same permissions to access all projects unrestricted components.

  • The restrictions imposed by a team’s Languages are applied separately, when it’s verified if a user has an access to perform certain actions. Namely, it’s applied only to actions directly related to the translation process itself like reviewing, saving translations, adding suggestions, etc.

提示

使用 Language selectionProject selection 來自動包括所有語言或專案。

示例:

可以這麼說這是一個專案 foo 擁有元件: foo/barfoo/baz 以及以下的團隊:

群組 西班牙語管理審查員

角色

審核字串, 管理儲存庫

組件

foo/bar

語言

西班牙語

該組的成員將有以下權限(假定使用預設角色設定):

  • 一般(瀏覽)存取整個專案``foo``,包括它的兩個元件:foo / bar``和``foo / baz

  • 審核字串 foo/bar 在西班牙語翻譯中(不在其他地方)。

  • 管理整個```foo / bar``jociticory的VCS。送交待定的翻譯人員對所有語言進行的更改。

自動團隊分派

While editing the Team, you can specify Automatic assignments, which is a list of regular expressions used to automatically assign newly created users to a team based on their e-mail addresses. This assignment only happens upon account creation.

The most common use-case for the feature is to assign all new users to some default team. This behavior is used for the default Users and Guest teams (see 團隊列表). Use regular expression ^.*$ to match all users.

Another use-case for this option might be to give some additional privileges to employees of your company by default. Assuming all of them use corporate e-mail addresses on your domain, this can be accomplished with an expression like ^.*@mycompany.com.

備註

從一個 Weblate 版本升級到另一個版本時,總是會重新建立對 UsersViewers 的使用者團隊指派。如果您想關閉它,將常規表達式設定為 ``^$``(不比對任何內容)。

備註

直到現在,無法透過使用者介面向某些團隊批次新增已現有使用者。為此,您可以使用以下方法 REST API

預設團隊和角色

After installation, a default set of teams is created (see 團隊列表).

These roles and teams are created upon installation. The built-in roles are always kept up to date by the database migration when upgrading. You can’t actually change them, please define a new role if you want to define your own set of permissions.

List of privileges

範圍

權限

Built-in roles

帳單(參閱 帳單

檢視帳單資訊

Administration, Billing

更動

下載更動處

Administration

評註

張貼評註

Administration, Edit source, Power user, Review strings, Translate

刪除評註

Administration

解決評註

Administration, Review strings

組件

編輯組件設定

Administration

鎖定組件,防止翻譯

Administration, Manage repository

詞彙表

增加詞彙表條目

Administration, Manage glossary, Power user

編輯詞彙表條目

Administration, Manage glossary, Power user

刪除詞彙表條目

Administration, Manage glossary, Power user

上傳詞彙表條目

Administration, Manage glossary, Power user

自動建議

使用自動建議

Administration, Edit source, Power user, Review strings, Translate

翻譯記憶

編輯翻譯記憶

Administration, Manage translation memory

刪除翻譯記憶

Administration, Manage translation memory

專案

編輯專案設定

Administration

管理專案存取權

Administration

回報

下載報表

Administration

螢幕擷圖

加入畫面快照

Administration, Manage screenshots

編輯畫面快照

Administration, Manage screenshots

刪除畫面快照

Administration, Manage screenshots

來源字串

編輯額外字串資訊

Administration, Edit source

字串

新增新字串

Administration

移除字串

Administration

略過未通過查核

Administration, Edit source, Power user, Review strings, Translate

編輯字串

Administration, Edit source, Power user, Review strings, Translate

檢閱字串

Administration, Review strings

當施行建議時編輯字串

Administration, Review strings

編輯來源字串

Administration, Edit source, Power user

建議

接受建議

Administration, Edit source, Power user, Review strings, Translate

新增建議

Administration, Edit source, Add suggestion, Power user, Review strings, Translate

刪除建議

Administration, Power user

建議的投票

Administration, Edit source, Power user, Review strings, Translate

翻譯

加入新語言的翻譯

Administration, Power user, Manage languages

執行自動翻譯

Administration, Automatic translation

刪除既有的翻譯

Administration, Manage languages

下載翻譯檔案

Administration, Edit source, Access repository, Power user, Review strings, Translate, Manage languages

加入多種新語言的翻譯

Administration, Manage languages

上傳

定義上傳翻譯的作者

Administration

以上傳內容覆蓋現在的翻譯

Administration, Edit source, Power user, Review strings, Translate

上傳翻譯

Administration, Edit source, Power user, Review strings, Translate

VCS

存取內部儲存庫

Administration, Access repository, Power user, Manage repository

將變更送交到內部儲存庫

Administration, Manage repository

從內部儲存庫推送變更

Administration, Manage repository

重設內部儲存庫中的變更

Administration, Manage repository

檢視上游儲存庫的位置

Administration, Access repository, Power user, Manage repository

更新內部儲存庫

Administration, Manage repository

全網站範圍的特權

使用管理介面

加入新的專案

加入語言定義

管理語言定義

管理團隊

管理使用者

管理角色

管理公告

管理翻譯記憶

管理機器翻譯

管理組件列表

管理付款

備註

站點範圍的特權不會被授予任何預設角色。它們功能強大,非常接近超級使用者的地位。它們中的大多數都會影響到您的 Weblate 安裝中的所有專案。

List of built-in roles

Administration

View billing info, Download changes, Post comment, Delete comment, Resolve comment, Edit component settings, Lock component, preventing translations, Add glossary entry, Delete glossary entry, Edit glossary entry, Upload glossary entries, Use automatic suggestions, Delete translation memory, Edit translation memory, Edit project settings, Manage project access, Download reports, Add screenshot, Delete screenshot, Edit screenshot, Edit additional string info, Accept suggestion, Add suggestion, Delete suggestion, Vote on suggestion, Add language for translation, Add several languages for translation, Perform automatic translation, Delete existing translation, Download translation file, Add new string, Dismiss failing check, Remove a string, Edit strings, Edit string when suggestions are enforced, Review strings, Edit source strings, Define author of uploaded translation, Overwrite existing strings with upload, Upload translations, Access the internal repository, Commit changes to the internal repository, Push change from the internal repository, Reset changes in the internal repository, Update the internal repository, View upstream repository location

Edit source

Post comment, Use automatic suggestions, Edit additional string info, Accept suggestion, Add suggestion, Vote on suggestion, Download translation file, Dismiss failing check, Edit strings, Edit source strings, Overwrite existing strings with upload, Upload translations

Add suggestion

Add suggestion

Access repository

Download translation file, Access the internal repository, View upstream repository location

Manage glossary

Add glossary entry, Delete glossary entry, Edit glossary entry, Upload glossary entries

Power user

Post comment, Add glossary entry, Delete glossary entry, Edit glossary entry, Upload glossary entries, Use automatic suggestions, Accept suggestion, Add suggestion, Delete suggestion, Vote on suggestion, Add language for translation, Download translation file, Dismiss failing check, Edit strings, Edit source strings, Overwrite existing strings with upload, Upload translations, Access the internal repository, View upstream repository location

Review strings

Post comment, Resolve comment, Use automatic suggestions, Accept suggestion, Add suggestion, Vote on suggestion, Download translation file, Dismiss failing check, Edit strings, Edit string when suggestions are enforced, Review strings, Overwrite existing strings with upload, Upload translations

Translate

Post comment, Use automatic suggestions, Accept suggestion, Add suggestion, Vote on suggestion, Download translation file, Dismiss failing check, Edit strings, Overwrite existing strings with upload, Upload translations

Manage languages

Add language for translation, Add several languages for translation, Delete existing translation, Download translation file

Automatic translation

Perform automatic translation

Manage translation memory

Delete translation memory, Edit translation memory

Manage screenshots

Add screenshot, Delete screenshot, Edit screenshot

Manage repository

Lock component, preventing translations, Access the internal repository, Commit changes to the internal repository, Push change from the internal repository, Reset changes in the internal repository, Update the internal repository, View upstream repository location

Billing

View billing info

Add new projects

Add new projects

團隊列表

The following teams are created upon installation (or after executing setupgroups) and you are free to modify them. The migration will, however, re-create them if you delete or rename them.

訪客

定義未經身份驗證的使用者權限。

這個團隊只包括匿名使用者(請參見 ANONYMOUS_USER_NAME)。

You can remove roles from this team to limit permissions for non-authenticated users.

預設角色: Add suggestion, Access repository

審查員

This role ensures visibility of public projects for all users. By default, all users are members of this team.

By default, automatic team assignment makes all new accounts members of this team when they join.

預設角色:無

使用者

Default team for all users.

By default, automatic team assignment makes all new accounts members of this team when they join.

預設角色: Power user

審核員

審核員專用的群組(參閱 翻譯工作流 )。

預設角色:審核字串

管理員

管理員專用群組。

預設角色: 管理權限

Project creators

Added in version 5.1.

Users who can create new projects.

Default roles: Add new projects

警告

Never remove the predefined Weblate teams and users as this can lead to unexpected problems! If you have no use for them, you can removing all their privileges instead.

Additional access restrictions

If you want to use your Weblate installation in a less public manner, i.e. allow new users on an invitational basis only, it can be done by configuring Weblate in such a way that only known users have an access to it. In order to do so, you can set REGISTRATION_OPEN to False to prevent registrations of any new users, and set REQUIRE_LOGIN to /.* to require signing in to access all the site pages. This is basically the way to lock your Weblate installation.

提示

您可以使用內建的 :ref:`invite-user`新增使用者。