存取控制
Weblate 具有一個精細的權利系統,可以為整個實例或在有限範圍內分配用戶權限。
在 3.0 版本變更: Before Weblate 3.0, the privilege system was based on Django privilege system only, but is specifically built for Weblate now. If using anything older, please consult the documentation for the specific version you are using.
Simple access control
如果你不是管理整個Weblate安裝,而只是有權限管理某些項目(比如在`託管Weblate <https://hosted.weblate.org/>`_),你的存取控制管理選項僅限於以下設定。如果你不需要任何複雜的設定,這些就足夠了。
專案存取控制
備註
This feature is unavailable for projects running the Libre plan on Hosted Weblate.
您可以透過選擇不同的:guilabel:`存取控制`設定來限制使用者對單個項目的存取。可用的選項有:
- 公開
Publicly visible, translatable for all signed-in users.
- 受保護
Publicly visible, but translatable only for selected users.
- 私人
Visible and translatable only for selected users.
- 自訂
:ref:`使用者管理<manage-acl>`功能將被停用;預設情況下,所有使用者都被禁止在專案上進行任何操作。你必須使用:ref:`custom-acl`設定所有的權限。
可以在每個項目的配置(:guilabel:`Manage↓:guilabel:`Settings)的:guilabel:`Access`選項卡中更改Access控制。

可以通過 DEFAULT_ACCESS_CONTROL
更改默認值。
備註
即使對於 “私有” 項目,也會公開有關項目的一些信息: 儘管具有訪問控制設置,所有項目的計數都會包含在整個實例的統計信息和語言摘要裡面。你的項目名稱和其他信息不會暴露。
備註
項目中默認提供“公開”,”受保護”,及“私有”的用戶權限組合, Weblate的實例管理員也可以使用:ref:`custom settings <custom-acl>`進行個性化定制.
警告
通過打開 Custom 訪問控制, Weblate 會刪除所有為一個選定項目建立的 special groups。如果你在沒有整個 Weblate 實例的管理員權限的情況下這樣做,你會立即丟失管理項目的權限。
也參考
Managing per-project access control
Users with the Manage project access privilege (see List of privileges and built-in roles) can manage users in projects via adding them to the teams. The initial collection of teams is provided by Weblate, but additional ones can be defined providing more fine-grained access control. You can limit teams to languages and assign them designated access roles (see List of privileges and built-in roles).
The following teams are automatically created for every project:
關於‘公開’,‘受保護’,及‘私有’項目:
- 管理
Includes all permissions available for the project.
- 複查 (僅限 :ref:`review workflow <reviews>`設置為打開)
可以在復查時批准翻譯。
只限‘受保護’及‘私有’項目:
- 翻譯
可以翻譯項目,並將離線的翻譯上傳。
- 原文
可以編輯源字符串 (如果在 project settings 中允許的話 )及源字符串信息。
- 語言
Can manage translated languages (add or remove translations).
- 詞彙表
Can manage glossary (add or remove entries, also upload).
- 記憶
Can manage translation memory.
- 畫面快照
Can manage screenshots (add or remove them, and associate them to source strings).
- 自動翻譯
Can use automatic translation.
- VCS
可以管理版本控制系統(VCS)並訪問導出的倉庫。
- 帳單
可以訪問賬單信息和設置(請參見 帳單 )。

這些功能可在 Access control 頁面上找到,頁面訪問路徑為項目 menu Manage ↓ Users。
New user invitation
Also, besides adding an existing user to the project, it is possible to invite new ones. Any new user will be created immediately, but the account will remain inactive until signing in with a link in the invitation sent via an e-mail. 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.
提示
如果被邀請的用戶錯過了邀請的有效性,則可以在密碼重置表單中使用被邀請的電子郵件地址設置密碼,因為已經創建了帳戶。
在 3.11 版本新加入: 重新發送用戶邀請電子郵件是有可能的 (使任何之前發送的邀請無效)。
Blocking users
在 4.7 版本新加入.
In case some users behave badly in your project, you have an option to block them from contributing. The blocked user still will be able to see the project if he has permissions for that, but he won’t be able to contribute.
Per-project permission management
You can set your projects to Protected or Private, and manage users per-project in the Weblate user interface.
默認情況下,這可以防止WebBleate授予“用戶”和“查看者”提供的訪問權限:“默認組<default-groups>`由於這些組所擁有的配置,因此。這不會阻止您通過更改默認組,為默認組創建新的一個項目,或者為以下單個組件創建其他自定義設置,或者如下所示,為以下組件創建其他自定義設置來授予權限
One of the main benefits of managing permissions through the Weblate user interface is that you can delegate it to other users without giving them the superuser privilege. In order to do so, add them to the Administration team of the project.
Custom access control
備註
This feature is unavailable for projects running the Libre plan on Hosted Weblate.
The permission system is based on groups and roles, where roles define a set of permissions, and groups link them to users and translations, see Users, roles, groups, and permissions for more details.
Weberate’s Access Control系統的最強大功能僅通過以下方式提供:REF:Django管理員界面<admin-interface>。您可以使用它來管理任何項目的權限。您不一定必須將其切換到“自定義”:REF:“訪問控制<ACL>”使用它。但是,您必須具有超級用戶權限才能使用它。
如果您對實現的詳細信息不感興趣,並且只想根據默認值創建一個簡單的配置,或者沒有對整個WebBlate安裝的站點廣泛訪問(如“託管的WebLate <https:// hosted.weblate.org/>`_),請參閱:REF:“訪問 - 簡單”部分。
常見設定
此部分包含了一些您可能感興趣的常用配置選項的概覽。
Site-wide permission management
要立即管理整個實例的權限,請添加用戶相當:ref:``默認組<default-groups>`:
“用戶”(這是默認情況下的:REF:“自動組分配<autogroup>`)。
`審稿人員(如果您使用的是:REF:“評論工作流程<評論>”與專用評論者)。
“經理”(如果您想將大多數管理操作委派給其他人)。
您應該將配置為“公共”(參見:REF:“ACL`)”保留所有項目(參見:“ACL`),否則”用戶“和”審閱者“群組中的成員資格提供的網站範圍權限將不會產生任何影響。
您還可以授予您選擇的一些額外權限到默認組。例如,您可能希望允許管理所有`用戶`的屏幕截圖。
您也可以定義一些新的自定義組。如果您想繼續管理這些組的網站範圍,請為以下組選擇適當的價值:Guilabel:“項目選擇”(例如:Guilabel:“所有項目”或“”“”“”:“”所有公共項目“)。
Custom permissions for languages, components or projects
您可以創建自己的專用組來管理不同對象(如語言,組件和項目)的權限。雖然這些組只能授予額外的權限,但您無法通過添加另一個自定義組來撤消站點範圍或每個項目組授予的任何權限。
示例:
如果您想要(無論出於何種原因)允許翻譯到特定語言(讓我們說“捷克語”)僅在一組封閉式的可靠翻譯器,同時保持翻譯到其他語言公眾,您將不得不:
刪除從所有用戶翻譯“捷克語”的權限。在默認配置中,可以通過更改“用戶”來完成:“默認組<default-groups>`。
Group Users 語言選取
As defined
語言
All but Czech
為`捷克語翻譯添加專用組。
Group Czech translators 角色
Power users
專案選取
All public projects
語言選取
As defined
語言
Czech
添加您希望將權限的用戶添加到此組中。
正如您所看到的,這種方式的權限管理是強大的,但可能是相當繁瑣的工作。除非授予超級用戶權限,否則您無法將其委派給另一個用戶。
Users, roles, groups, and permissions
身份驗證模型包括幾個對象:
- 許可
Weblate 定義的個人權限。權限不能分配給用戶。這只能通過分配角色來完成。
- Role
角色定義為一組權限。這允許在幾個地方重複使用這些組,使管理更容易。
- 使用者
用戶可歸屬於幾個用戶組。
- 群組
用戶組連接角色、用戶和身份驗證對象(項目、語言和組件列表)。
備註
一個組可以沒有分配角色,在這種情況下,假設任何人訪問項目(見下文)。
Access for browse to a project
用戶必須是鏈接到項目的組或項目中的任何組件的成員。擁有成員身份就足夠了,瀏覽項目不需要特定的權限 (這被用於默認的 查看者 小組,見 List of groups )。
Access for browse to a component
用戶一旦能夠訪問組件的項目,就可以不受限制地訪問組件。 (並將擁有該項目授予用戶的所有權限)。在開啟 受限制的訪問 的情況下,訪問組件需要對該組件(或該組件所在的組件列表)具有顯式權限。
Scope of groups
由組中的角色分配的權限範圍由以下規則應用:
如果該組指定任何:Guilabel:“組件列表”,則為附加到該組的組件列表中的所有組件授予給予該組成員的所有權限,並且對所有項目授予任何沒有其他權限的訪問權限這些組件在內。:圭冊:“組件”和“:”圭冊:“項目”被“忽視”。
如果該組指定任何:Guilabel:“組件”,則為將該組的成員提供給組的所有組件,對於該組的所有組件授予所有權限,並且對於這些組件的所有項目授予沒有額外權限的訪問權限。:桂扎爾:“項目”被忽略。
你可以在 `donate page`_上助推 Weblate 的開發。收集到的資金用於免費託管自由軟件項目和 Weblate 的進一步開發。籌款目標和資助者的回報等選項,請查看 `donate page`_。
組的限制:圭冊:“語言”是分開應用的,如果用戶可以訪問執行某些操作,則會驗證。即,它僅應用於與翻譯過程本身直接相關的操作,如審閱,保存翻譯,添加建議等。
提示
使用 Language selection 或 Project selection 來自動包括所有語言或項目。
示例:
讓我們說出一個項目```foo``:
foo / bar``和`````````````````````````````
Group Spanish Admin-Reviewers 角色
Review Strings, Manage repository
組件
foo/bar
語言
Spanish
該組的成員將有以下權限(假設默認角色設置):
一般(瀏覽)訪問整個項目``foo``,包括它的兩個組件:
foo / bar``和``foo / baz
。審查’foo /酒吧』』s西班牙語翻譯(不是其他地方)的字符串。
管理整個```foo / bar``jociticory的VCS。提交待定的翻譯人員對所有語言進行的更改。
自動群組分派
On the bottom of the Group editing page in the Django admin interface, you can specify Automatic group assignments, which is a list of regular expressions used to automatically assign newly created users to a group based on their e-mail addresses. This assignment only happens upon account creation.
該功能最常見的用例是將所有新用戶分配給一些默認組。為此,您可能希望在正則表達式字段中保留默認值(“^。* $``)。此選項的另一個用例可能是默認為貴公司的員工提供一些額外的權限。假設所有這些都在域上使用公司電子郵件地址,這可以通過表達式來完成,如“^。* @ mycompany.com```。
備註
從一個 Weblate 版本升級到另一個版本時z總是會重新創建對 Users 和 Viewers 的用戶組分配。如果你想關閉它,將正則表達式設置為 ``^$``(不匹配任何內容)。
備註
至於現在,無法通過用戶界面向某些組批量添加已現有用戶。為此,您可以使用以下方法:參考:Ref:“REST API <API>”。
默認群組和角色
安裝後,創建默認組組(請參閱:參考:“默認組”)。
這些角色和組是在安裝時創建的。升級時,內置角色始終通過數據庫遷移保持最新狀態。你實際上無法更改它們,如果要定義自己的權限集,請定義一個新角色。
List of privileges and built-in roles
範圍 |
權限 |
角色 |
---|---|---|
Billing (see 帳單) |
檢視帳單資訊 |
Administration, Billing |
更動 |
下載更動處 |
Administration |
評註 |
張貼評註 |
Administration, Edit source, Power user, Review strings, Translate |
刪除評註 |
Administration |
|
Resolve comment |
Administration, Review strings |
|
組件 |
編輯組件設定 |
Administration |
鎖定組件,防止翻譯 |
Administration |
|
詞彙表 |
增加詞彙表條目 |
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 groups
下面的群組在安裝時建立(或在執行 setupgroups
後), 您可以自由修改它們。但是,如果它們被刪除或重命名,遷移後將重新創建這些名稱。
- 訪客
Defines permissions for non-authenticated users.
這個群組只包括匿名用戶(請參見
ANONYMOUS_USER_NAME
)。你可以從群組中去掉角色,來限制非授權用戶的權限。
默認角色: Add suggestion, Access repository
- Viewers
這一角色確保公開項目對所有用戶可見。默認情況下,所有用戶都是該組的成員。
默認情況下,:參考:“自動組分配<autogroup”>“在加入時製作此組的所有新帳戶成員。
Default roles: none
- 使用者
刪除所有使用者的群組。
默認情況下,:參考:“自動組分配<autogroup”>“在加入時製作此組的所有新帳戶成員。
默認角色: Power user
- 校對
复核員的群組(參見 翻譯工作流 )。
默認角色: Review strings
- 管理員
Group for administrators.
Default roles: Administration
警告
決不要移除預先定義的 Weblate 群組和用戶,因為這會這可能會導致意想不到的問題!如果你不需要他們,你可以刪除他們的所有特權。
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.
提示
You can use built-in New user invitation to add new users.