Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Access control documentation reworked 2.5 #5723

Merged
merged 27 commits into from
Jun 28, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
203f626
Docs: Access control documentation reworked 2.5
comradekingu Mar 22, 2021
1e80295
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 22, 2021
e43aee4
First pass complete
comradekingu Mar 23, 2021
0a0adb9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 23, 2021
585c3d4
Spelling: editing built-in roles not possible, lost when upgrading
comradekingu Mar 28, 2021
9c66b5d
Spelling: - Custom changes are not lost
comradekingu Mar 28, 2021
ed5d761
Merge branch 'main' into patch-249
comradekingu May 3, 2021
2b2bc8a
Merge branch 'main' into patch-249
comradekingu May 25, 2021
27b90d9
Merge branch 'main' into patch-249
comradekingu Aug 17, 2021
64f7728
319-655 reworked
comradekingu Aug 17, 2021
e0e43ee
New failing checks fixed
comradekingu Nov 13, 2021
d3fd669
Some more polish
comradekingu Nov 13, 2021
3932d66
Merge branch 'main' into patch-249
comradekingu Feb 8, 2022
21df842
Merge branch 'main' into patch-249
nijel Dec 21, 2023
4951eaf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 21, 2023
506895f
Merge branch 'main' into patch-249
nijel Feb 19, 2024
0f6ff75
Update docs/admin/access.rst
nijel Feb 19, 2024
bdccb18
Requested changes made
comradekingu Feb 19, 2024
d527997
Update docs/admin/access.rst
nijel Feb 23, 2024
7977588
Merge branch 'main' into patch-249
nijel Mar 25, 2024
0084eba
Update docs/admin/access.rst
nijel Mar 25, 2024
d5134c9
Update docs/admin/access.rst
nijel Mar 25, 2024
926ce97
Update docs/admin/access.rst
nijel Mar 25, 2024
44a30ce
Update access.rst
orangesunny Jun 28, 2024
afd9eb9
Update access.rst
orangesunny Jun 28, 2024
2b9048b
Update access.rst
orangesunny Jun 28, 2024
b555f16
Merge branch 'main' into patch-249
orangesunny Jun 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 78 additions & 74 deletions docs/admin/access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Access control
==============

Weblate comes with a fine-grained privilege system to assign user permissions
for the whole instance, or in a limited scope.
for the whole instance with predefined roles, or by assigning one or more
groups of permissions to users for everything, or individual projects, components,
orangesunny marked this conversation as resolved.
Show resolved Hide resolved
glossaries, and so on.

.. _acl:

Expand All @@ -17,8 +19,8 @@ Project access control
:guilabel:`Public`. You can switch to the paid plan if you want to restrict
access to your project.

You can limit user’s access to individual projects by selecting a different
:ref:`project-access_control` setting. Available options are:
Limit user access to individual projects by selecting a different
:ref:`project-access_control` setting. The available options are:

:guilabel:`Public`
Visible to everybody.
Expand Down Expand Up @@ -63,20 +65,18 @@ project.

.. image:: /screenshots/project-access.webp

The default value can be changed by :setting:`DEFAULT_ACCESS_CONTROL`.
The default can also be changed by setting :setting:`DEFAULT_ACCESS_CONTROL`.

.. note::

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.
Even `Private` project statistics are counted into
the site-wide statistics and language summary.
This does not reveal project names or any other info.

.. note::

The actual set of permissions available for users by default in `Public`,
`Protected`, and `Private` projects can be redefined by Weblate instance
administrator using :ref:`custom settings <custom-acl>`.
Instance administraotrs can modify the default permission sets available to users
in `Public`, `Protected`, and `Private` projects by using :ref:`custom settings <custom-acl>`.

.. seealso::

Expand All @@ -87,65 +87,71 @@ The default value can be changed by :setting:`DEFAULT_ACCESS_CONTROL`.
Managing per-project access control
-----------------------------------

Users with the :guilabel:`Manage project access` privilege (see
:ref:`privileges`) 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 :ref:`privileges`).
For `Public`, `Protected` and `Private` projects:

The following teams are automatically created for every project:
Granting users :guilabel:`Manage project access` (see :ref:`privileges`)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue it doesn't need to be pointed out that users need to have MPA to do what is explained to be recursive about MPA.
My original intent must have been to replace the duplicated text, and then I didn't remove the original one.
Maybe it makes sense now, but not at all sure.

Some of the text is moved to a hint below.

allows them to assign other users in Public`, `Protected` and
`Private` (but not `Custom`) projects via adding them to teams.

For `Public`, `Protected` and `Private` projects:
These are the default teams provided with Weblate; teams can
be added or modified by users with sufficient privileges:

Administration
Includes all permissions available for the project.
All available permissions for the project.
orangesunny marked this conversation as resolved.
Show resolved Hide resolved

Review (only if :ref:`review workflow <reviews>` is turned on)
Can approve translations during review.
Review (if :ref:`review workflow <reviews>` is on)
Approve translations in a review.

For `Protected` and `Private` projects only:

Translate
Can translate the project and upload translations made offline.
Translate the project and upload translations made offline.

Sources
Can edit source strings (if allowed in the
:ref:`project settings <component-manage_units>`) and source string info.
Edit source strings (if allowed in the
:ref:`project settings <component-manage_units>`) and source-string info.

Languages
Can manage translated languages (add or remove translations).
Manage translated languages (add or remove translations).
orangesunny marked this conversation as resolved.
Show resolved Hide resolved

Glossary
Can manage glossary (add or remove entries, also upload).
Manage glossary (add, remove, and upload entries).

Memory
Can manage translation memory.
Manage translation memory.

Screenshots
Can manage screenshots (add or remove them, and associate them to source
Manage screenshots (add, remove, and associate them to source
strings).

Automatic translation
Can use automatic translation.

VCS
Can manage VCS and access the exported repository.
Manage VCS and access the exported repository.

Billing
Can access billing info and settings (see :ref:`billing`).
Access billing info and settings (see :ref:`billing`).

.. image:: /screenshots/manage-users.webp

These features are available on the :guilabel:`Access control` page, which can be
accessed from the project’s menu :guilabel:`Manage` ↓ :guilabel:`Users`.
These features are available on the :guilabel:`Access control` page in
the project’s menu :guilabel:`Manage` ↓ :guilabel:`Users`.

.. hint::

You can limit teams to languages or components,
and assign them designated access roles (see :ref:`privileges`).


Team administrators
+++++++++++++++++++

.. versionadded:: 4.15

Each team can have team administrator, who can add and remove users within the
team. This is useful in case you want to build self-governed teams.
Each team can have team administrator,
who can add and remove users within the team.
This is useful in case you want to build self-governed teams.

.. _invite-user:

Expand Down Expand Up @@ -181,16 +187,15 @@ Blocking users

.. versionadded:: 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.
If users misbehave in your project, you can block them from contributing.
With the relevant permissions blocked, users can still see the project,
but won't be able to contribute.

Per-project permission management
+++++++++++++++++++++++++++++++++

You can set your projects to :guilabel:`Protected` or :guilabel:`Private` (see
:ref:`acl`), and :ref:`manage users <manage-acl>` per-project in the Weblate
user interface.
:ref:`acl`), and :ref:`manage users access <manage-acl>` per-project.

By default this prevents Weblate from granting access provided by
`Users` and `Viewers` :ref:`default teams <default-teams>` due to these teams’
Expand All @@ -210,9 +215,9 @@ Site-wide access control

.. include:: /snippets/not-hosted.rst

The permission system is based on teams and roles, where roles define a set of
permissions, and teams link them to users and translations, see
:ref:`auth-model` for more details.
The permission system is based on roles defining a set of permissions,
and teams linking roles to users and translations, read :ref:`auth-model`
for more details.

The most powerful features of the Weblate’s access control system can be configured
in the :ref:`management-interface`. You can use it to manage permissions of any
Expand Down Expand Up @@ -261,11 +266,10 @@ by site-wide or per-project teams by adding another custom team.

**Example:**

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:
Restricting translation to `Czech` to a selected set of translators,
(while keeping translations to other languages public):

1. Remove the permission to translate `Czech` from all the users. In the
1. Remove the permission to translate `Czech` from all users. In the
default configuration this can be done by altering the `Users`
:ref:`default team <default-teams>`.

Expand Down Expand Up @@ -297,9 +301,8 @@ by site-wide or per-project teams by adding another custom team.

3. Add users you wish to give the permissions to into this team.

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.
Management permissions this way is powerful, but can be quite a tedious job.
You can only delegate it to other users by granting them Superuser status.

.. _auth-model:

Expand All @@ -310,15 +313,15 @@ The authentication models consist of several objects:

`Permission`
Individual permission defined by Weblate. Permissions cannot be
assigned to users. This can only be done through assignment of roles.
assigned to users, only through assignment of roles.
`Role`
A role defines a set of permissions. This allows reuse of these sets in
several places, making the administration easier.
A role defines a set of permissions (and can be reused in several
places).
`User`
User can belong to several teams.
A user can belong to several teams.
`Group`
Group connect roles, users, and authentication objects (projects,
languages, and component lists).
Groups connect roles and users with authentication objects
(projects, languages, components, and component lists).

.. graphviz::

Expand All @@ -338,21 +341,21 @@ The authentication models consist of several objects:
A team 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
++++++++++++++++++++++++++++++
Project-browsing access
+++++++++++++++++++++++

A user has to be a member of a team 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` team, see
:ref:`default-teams`).

Access for browse to a component
++++++++++++++++++++++++++++++++
Component-browsing access
+++++++++++++++++++++++++

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 :ref:`component-restricted` turned on, access to the component
requires explicit permissions for the component (or a component list the component is in).
Granting browsing access to a user in one project gives it access to
any component with derived browsing permissions.
With :ref:`component-restricted` on, access to components
(or component lists) are granted explicitly.

.. _perm-check:

Expand Down Expand Up @@ -394,8 +397,9 @@ the following rules:

**Example:**

Let’s say there is a project ``foo`` with the components: ``foo/bar`` and
``foo/baz`` and the following team:
A project ``foo`` with the components: ``foo/bar`` and
``foo/baz``, with reviewing and management rights, in the
following team:

.. list-table:: Group `Spanish Admin-Reviewers`
:stub-columns: 1
Expand All @@ -409,7 +413,7 @@ the following rules:

..

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

- General (browsing) access to the whole project ``foo`` including both
components in it: ``foo/bar`` and ``foo/baz``.
Expand Down Expand Up @@ -587,9 +591,9 @@ List of privileges

.. note::

Site-wide privileges are not granted to any default role. These are
powerful and quite close to superuser status. Most of them affect all projects
in your Weblate installation.
Site-wide privileges are not granted to any default role.
These are powerful and quite close to the Superuser status.
Most of them affect all projects in your Weblate installation.

List of built-in roles
++++++++++++++++++++++
Expand Down Expand Up @@ -642,14 +646,14 @@ however, re-create them if you delete or rename them.

This team only contains anonymous users (see :setting:`ANONYMOUS_USER_NAME`).

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

Default roles: `Add suggestion`, `Access repository`

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

By default, :ref:`automatic team assignment <autoteam>` makes all new
accounts members of this team when they join.
Expand Down Expand Up @@ -683,8 +687,8 @@ however, re-create them if you delete or rename them.

.. warning::

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
Never remove the predefined Weblate teams and users, as that can lead to
unexpected problems! If you have no use for them, simply remove all their
privileges instead.

Additional access restrictions
Expand Down
Loading