Управление доступом

Weblate поставляется с тонко настраиваемой системой привилегий для назначения пользователям прав как в рамках всего экземпляра приложения, так и в рамках отдельных его частей.

Изменено в версии 3.0: До версии Weblate 3.0 система привилегий базировалась только на системе привилегий Django, но теперь построена специально для Weblate. Если вы используете что-то более старое, пожалуйста, обратитесь к документации по конкретной версии, которую вы используете.

Простой контроль доступа

Если вы не администрируете всю установку Weblate и просто имеете доступ к управлению определёнными проектами (например, на Hosted Weblate), ваши возможности управления доступом ограничены следующими настройками. Их достаточно, если вам не нужны сложные настройки.

Управление доступом к проекту

Примечание

Эта функция недоступна на тарифном плане для свободного ПО на облачный хостинг Weblate.

You can limit user’s access to individual projects by selecting a different Access control setting. Available options are:

Публичный

Проект видим для всех, и все зарегистрированные пользователи могут переводить.

Защищённый

Проект видят все, но переводить могут только отдельные пользователи.

Частный

Видеть и переводить проект могут только отдельные пользователи.

Настраиваемый

User management features will be disabled; by default all users are forbidden to performed any actions on the project. You will have to set up all the permissions using Настраиваемый контроль доступа.

Access control can be changed in the Access tab of the configuration (ManageSettings) of each respective project.

../_images/project-access.png

Значение по умолчанию можно изменить с помощью DEFAULT_ACCESS_CONTROL.

Примечание

Even for Private projects, some info about your project will be exposed: statistics and language summary for the whole instance will include counts for all projects despite the access control setting. Your project name and other information can’t be revealed through this.

Примечание

The actual set of permissions available for users by default in Public, Protected, and Private projects can be redefined by Weblate instance administrator using custom settings.

Предупреждение

При включённом контроле доступа Custom, Weblate удалит все special groups, которые он создал для выбранного проекта. Если вы делаете это без прав администратора для всего экземпляра Weblate, вы мгновенно потеряете доступ к управлению проектом.

По-проектная настройка доступа

Пользователи с привилегией Управление доступом к проекту (см. раздел Список привилегий) также могут управлять пользователями в проектах с не-Custom доступом. Они могут назначать пользователей в одну из следующих групп.

For Public, Protected and Private projects:

Администрирование

Включает все разрешения, доступные для проекта.

Review (only if review workflow is turned on)

Может одобрять переводы во время рецензирования.

For Protected and Private projects only:

Перевести

Может переводить проект и загружать переводы, сделанные в автономном режиме.

Источники

Может редактировать исходные строки (если это разрешено в настройках проекта) и информацию об исходной строке.

Языки

Может управлять языками перевода (добавлять или удалять переводы).

Глоссарий

Может управлять глоссарием (добавлять, удалять или загружать записи в глоссарий).

Накопитель

Может управлять памятью переводов.

Снимки экрана

Может управлять снимками экрана (добавлять или удалять их, а также связывать их с исходными строками).

СКВ (VCS)

Может управлять системой контроля версий и имеет доступ к экспортированному репозиторию.

Биллинг

Имеет доступ к биллингу и его настройкам (см. раздел Биллинг).

Unfortunately, it’s not possible to change this predefined set of groups for now. Also this way it’s not possible to give just some additional permissions to all users.

Примечание

For non-Custom access control an instance of each group described above is actually defined for each project. The actual name of those groups will be Project@Group, also displayed in the Django admin interface this way. Although they can’t be edited from Weblate user-interface.

../_images/manage-users.png

These features are available on the Access control page, which can be accessed from the project’s menu ManageUsers.

Новое приглашение пользователя

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 group) would be sufficient.

Подсказка

If the invited user missed the validity of the invitation, they can set their password using invited e-mail address in the password reset form as the account is created already.

Добавлено в версии 3.11: Есть возможность повторной отправки email с пользовательскими приглашениями (аннулирование любого ранее отправленного приглашения).

The same kind of invitations are available site-wide from the management interface on the Users tab.

Управление разрешениями для каждого проекта

Установите Защищённый или Частный тип доступа к вашим проектам и управляйте пользователями отдельно для каждого проекта через интерфейс Weblate.

By default this prevents Weblate from granting access provided by Users and Viewers default groups due to these groups’ own configuration. This doesn’t prevent you from granting permissions to those projects site-wide by altering default groups, creating a new one, or creating additional custom settings for individual component as described in Настраиваемый контроль доступа below.

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 group of the project.

Настраиваемый контроль доступа

Примечание

Эта функция недоступна на тарифном плане для свободного ПО на облачный хостинг Weblate.

Система разрешений построена на основе групп и ролей. Роли определяют набор разрешений, а группы назначают их пользователям и переводчикам. Для получения более подробной информации см. раздел Пользователи, роли, группы и разрешения.

The most powerful features of the Weblate’s access control system for now are available only through the Django admin interface. 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.

Распространённые варианты конфигурации

This section contains an overview of some common configurations you may be interested in.

Управление разрешениями по всему сайту

To manage permissions for a whole instance at once, add users to appropriate default groups:

  • Users (this is done by default by the automatic group assignment).

  • Reviewers (if you are using review workflow with dedicated reviewers).

  • Managers (if you want to delegate most of the management operations to somebody else).

You should keep all projects configured as Public (see Управление доступом к проекту), otherwise the site-wide permissions provided by membership in the Users and Reviewers groups won’t have any effect.

You may also grant some additional permissions of your choice to the default groups. For example, you may want to give a permission to manage screenshots to all the Users.

You can define some new custom groups as well. If you want to keep managing your permissions site-wide for these groups, choose an appropriate value for the Project selection (e.g. All projects or All public projects).

Особые разрешения для определённых языков, компонентов или проектов

You can create your own dedicated groups to manage permissions for distinct objects such as languages, components, and projects. Although these groups can only grant additional privileges, you can’t revoke any permission granted by site-wide or per-project groups by adding another custom group.

Пример:

If you want (for whatever reason) to allow translation to a specific language (lets say Czech) only to a closed set of reliable translators while keeping translations to other languages public, you will have to:

  1. Remove the permission to translate Czech from all the users. In the default configuration this can be done by altering the Users default group.

    Группа Пользователи

    Выбор языка

    Как определено

    Языки

    All but Czech

  1. Add a dedicated group for Czech translators.

    Группа Чешские переводчики

    Роли

    Опытные пользователи

    Выбор проекта

    Все публичные проекты

    Выбор языка

    Как определено

    Языки

    Чешский

  1. Add users you wish to give the permissions to into this group.

As you can see, permissions management this way is powerful, but can be quite a tedious job. You can’t delegate it to another user, unless granting superuser permissions.

Пользователи, роли, группы и разрешения

Модели аутентификации состоят из нескольких объектов:

Разрешение

Individual permission defined by Weblate. Permissions cannot be assigned to users. This can only be done through assignment of roles.

Роль

A role defines a set of permissions. This allows reuse of these sets in several places, making the administration easier.

Пользователь

User can belong to several groups.

Группа

Group connect roles, users, and authentication objects (projects, languages, and component lists).

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

Примечание

A group can have no roles assigned to it, in that case access to browse the project by anyone is assumed (see below).

Access for browse to a project

A user has to be a member of a group linked to the project, or any component inside that project. Having membership is enough, no specific permissions are needed to browse the project (this is used in the default Viewers group, see Список групп).

Доступ для просмотра компонента

A user can access unrestricted components once able to access the components’ project (and will have all the permissions the user was granted for the project). With Ограниченный доступ turned on, access to the component requires explicit permissions for the component (or a component list the component is in).

Scope of groups

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

  • If the group specifies any Component list, all the permissions given to members of that group are granted for all the components in the component lists attached to the group, and an access with no additional permissions is granted for all the projects these components are in. Components and Projects are ignored.

  • If the group specifies any Components, all the permissions given to the members of that group are granted for all the components attached to the group, and an access with no additional permissions is granted for all the projects these components are in. Projects are ignored.

  • Otherwise, if the group 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 group’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.

Подсказка

Use Language selection or Project selection to automate inclusion of all languages or projects.

Пример:

Let’s say there is a project foo with the components: foo/bar and foo/baz and the following group:

Group Spanish Admin-Reviewers

Роли

Review Strings, Manage repository

Компоненты

foo/bar

Языки

Spanish

Members of that group will have following permissions (assuming the default role settings):

  • General (browsing) access to the whole project foo including both components in it: foo/bar and foo/baz.

  • Review strings in foo/bar Spanish translation (not elsewhere).

  • Manage VCS for the whole foo/bar repository e.g. commit pending changes made by translators for all languages.

Автоматические прикрепления группы

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.

The most common use-case for the feature is to assign all new users to some default group. In order to do so, you will probably want to keep the default value (^.*$) in the regular expression field. 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.

Примечание

Automatic group assignment to Users and Viewers is always recreated when upgrading from one Weblate version to another. If you want to turn it off, set the regular expression to ^$ (which won’t match anything).

Примечание

As for now, there is no way to bulk-add already existing users to some group via the user interface. For that, you may resort to using the REST API.

Группы и роли по умолчанию

After installation, a default set of groups is created (see Список групп).

These roles and groups 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.

Список привилегий

Тарифный план (смотрите раздел Биллинг)

Просмотр платёжной информации [Администрирование, Биллинг]

Изменения

Скачивание изменений [Администрирование]

Комментарии

Публикация комментариев [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Удаление комментариев [Администрирование]

Компонент

Правка параметров компонентов [Администрирование]

Блокировка компонента, предотвращает его перевод [Администрирование]

Глоссарий

Добавление записей в глоссарий [Администрирование, Управление глоссарием, Опытный пользователь]

Правка записей глоссария [Администрирование, Управление глоссарием, Опытный пользователь]

Удаление записей из глоссария [Администрирование, Управление глоссарием, Опытный пользователь]

Загрузка записей в глоссарий [Администрирование, Управление глоссарием, Опытный пользователь]

Автоматические предложения

Использование автоматических предложений [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Память переводов

Правка памяти переводов [Администрирование, Управление памятью переводов]

Удаление памяти переводов [Администрирование, Управление памятью переводов]

Проекты

Правка параметров проекта [Администрирование]

Управление доступом к проекту [Администрирование]

Отчёты

Скачивание отчётов [Администрирование]

Снимки экрана

Добавление снимков экрана [Администрирование, Управление снимками экрана]

Правка снимков экрана [Администрирование, Управление снимками экрана]

Удаление снимков экрана [Администрирование, Управление снимками экрана]

Исходные строки

Правка дополнительных свойств строки [Администрирование, Правка источника]

Строки

Добавление новой строки [Администрирование]

Удаление строки [Администрирование]

Игнорирование неудачных проверок [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Правка строк [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Рецензирование строк [Администрирование, Рецензирование строк]

Правка строк, когда предложения являются обязательными [Администрирование, Рецензирование строк]

Правка исходных строк [Администрирование, Правка источника, Опытный пользователь]

Предложения

Принятие предложения [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Добавление предложения [Администрирование, Правка источника, Добавление предложения, Опытный пользователь, Рецензирование строк, Перевод]

Удаление предложения [Администрирование, Опытный пользователь]

Голосование за предложения [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Переводы

Добавление языка для перевода [Администрирование, Опытный пользователь, Управление языками]

Производство автоматического перевода [Администрирование, Управление языками]

Удаление существующего перевода [Администрирование, Управление языками]

Добавление нескольких языков для перевода [Администрирование, Управление языками]

Загрузки

Задание автора загружаемого перевода [Администрирование]

Перезапись существующих строк при загрузке новых [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

Загрузка переводов [Администрирование, Правка источника, Опытный пользователь, Рецензирование строк, Перевод]

СКВ (VCS)

Доступ к внутреннему репозиторию [Администрирование, Доступ к репозиторию, Опытный пользователь, Управление репозиторием]

Коммит изменений во внутренний репозиторий [Администрирование, Управление репозиторием]

Отправка изменений из внутреннего репозитория [Администрирование, Управление репозиторием]

Сброс изменений во внутреннем репозитории [Администрирование, Управление репозиторием]

Просмотр расположения вышестоящего репозитория [Администрирование, Доступ к репозиторию, Опытный пользователь, Управление репозиторием]

Обновление внутреннего репозитория [Администрирование, Управление репозиторием]

Привилегии для всего сайта

Использование интерфейса управления

Добавление новых проектов

Добавление определений языка

Управление определениями языков

Управление группами

Управление пользователями

Управление ролями

Управление объявлениями

Управление памятью переводов

Управление списками компонентов

Примечание

Привилегии для всего сайта не предоставляются никаким умолчательным ролям. Они мощны и достаточно близки к статусу суперпользователя. Большинство из них влияют на все проекты вашей установки Weblate.

Список групп

The following groups 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).

Вы можете удалить роли из этой группы, чтобы ограничить разрешения для неаутентифицированных пользователей.

Роли по умолчанию: Добавление предложений, Доступ к репозиторию

Просматривающие

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

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

Роли по умолчанию: нет

Пользователи

Стандартная группа для всех пользователей.

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

Роли по умолчанию: Опытный пользователь

Рецензенты

Группа для рецензентов (смотрите раздел Рабочие процессы перевода).

Роли по умолчанию: Рецензирование строк

Управляющие

Группа для администраторов.

Роли по умолчанию: Администрирование

Предупреждение

Never remove the predefined Weblate groups 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 logging-in to access all the site pages. This is basically the way to lock your Weblate installation.

Подсказка

You can use built-in invitations to add new users.