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

[TASK] Add Setting Up BE Groups section for Permissions Managemend docs #330

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
b770c5e
[TASK] Add Setting Up BE Groups section for Permissions Managemend docs
Feb 27, 2024
a8d99ce
[TASK] Apply changes for Setting Up BE Groups docs after review
Feb 28, 2024
316b40e
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
4d3652f
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
78cba32
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
1b1df56
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
d71d685
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
973f064
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
e0f0692
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
12fc1d6
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
efc02c0
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
d498a82
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
fbfa68a
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
f0d457c
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 28, 2024
2899eb9
Update Documentation/PermissionsManagement/SettingUpBackendGroups/Ind…
linawolf Feb 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion Documentation/PermissionsManagement/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ They can be configured at the levels of users and groups. Access can be set up
for specific modules and pages, database mounts, file storage, content elements,
and also individual fields within content elements.

A well-thought out initial setup is particularly important for
A well-thought out initial setup is particularly important for
permissions management. Skipping this step can introduce complex
issues as your project expands. As time passes, managing access levels can turn
into a challenging and time-consuming task. In extreme situations, you might find
Expand All @@ -51,6 +51,8 @@ of recommended practices and guidelines that could be beneficial in managing
permissions within the TYPO3 backend. However, remember that these recommendations
are adaptable and can be tailored to suit your specific requirements.

.. _available-acl-options:

What access options can be set within TYPO3?
============================================

Expand Down Expand Up @@ -103,3 +105,4 @@ the naming convention for backend groups later on.
:titlesonly:
:glob:

SettingUpBackendGroups/Index
245 changes: 245 additions & 0 deletions Documentation/PermissionsManagement/SettingUpBackendGroups/Index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
.. include:: /Includes.rst.txt

.. index:: backend, acl, permissions, user groups, user management

.. _setting-up-backend-user-groups:

==============================
Setting up backend user groups
==============================

Backend user groups can be categorized into three main types. Those used to
grant permissions to pages and define mounts for databases, categories,
or files we can refer to as **System Groups**. The ones responsible for granting
access to modules, various content elements, record types, and specific fields
within forms can be termed **Access Control List (ACL) Groups**. Finally,
we have **Role Groups**, which aggregate groups from both the System and ACL Groups
to provide a permissions set representing a specific role.

This classification should not be seen as a TYPO3 standard, but rather as a guideline
that will assist in configuring groups later on. Read more to discover the details.

.. _system-groups:

System groups
=============

System groups will be those from the lowest level of permissions without which
soee marked this conversation as resolved.
Show resolved Hide resolved
other groups like :ref:`Access Control List (ACL) <_acl-groups>`
and :ref:`Role <_role_groups>` groups will not work.
They enable access to individual pages based on user and group IDs, allow
the definition of accessible sections of the pages or categories tree for users,
soee marked this conversation as resolved.
Show resolved Hide resolved
and determine access to files and folders within storages (via File Mounts).
System groups are likely to be the ones you modify the least often.

.. note::
System groups are likely to be the ones you modify the least often.

.. _acl-groups:

Access Control List (ACL) groups
================================

Access Control List (ACL) groups will form the largest set of groups, used to
soee marked this conversation as resolved.
Show resolved Hide resolved
set detailed permissions for elements like modules, dashboard widgets, tables
for listing and editing, and specific fields in backend forms.

It's crucial to configure the ACL group in such a way that it grants all
soee marked this conversation as resolved.
Show resolved Hide resolved
the necessary permissions for managing a specific element. For instance,
let's consider a custom record type (like Article, Product etc.), which
soee marked this conversation as resolved.
Show resolved Hide resolved
is displayed by custom plugins. Users responsible for managing these records
linawolf marked this conversation as resolved.
Show resolved Hide resolved
on the site should have the capability to list existing news items, create
linawolf marked this conversation as resolved.
Show resolved Hide resolved
new records, and access them, either through a dedicated custom backend module
or the List module. With this in mind, we should ensure such a group has access to:
linawolf marked this conversation as resolved.
Show resolved Hide resolved

* Listing and modifying the table of a records
* Editing all necessary fields within the record to align with this group's purpose
linawolf marked this conversation as resolved.
Show resolved Hide resolved
* Accessing the core List module or custom module for records management
* If there are relations from this record, for example, to files, it should also permit uploading, selecting, and processing these files

Therefore, consider such a group as an independent unit that provides complete
linawolf marked this conversation as resolved.
Show resolved Hide resolved
access to a specific part of the system and can be integrated later with other units (groups).

.. note::
Consider an Access Control List (ACL) group as a standalone, complete set of
linawolf marked this conversation as resolved.
Show resolved Hide resolved
permissions tailored to a specific element(s), designed to fulfill its defined
linawolf marked this conversation as resolved.
Show resolved Hide resolved
scope or purpose (editing/managing Articles or Products).

.. _role-groups:

Role groups as aggregators of specific role permissions
linawolf marked this conversation as resolved.
Show resolved Hide resolved
=======================================================

Backend role groups in TYPO3 are designed to correspond to the specific roles
users fulfill, such as editor, proofreader, etc. These groups inherit permissions
from other assigned groups rather than having direct accesses assigned to them.
linawolf marked this conversation as resolved.
Show resolved Hide resolved
Instead, they accumulate permissions exclusively through the inheritance from subgroups.
linawolf marked this conversation as resolved.
Show resolved Hide resolved
This hierarchical setup ensures that role groups can effectively grant users
the precise set of permissions needed to perform their designated roles, such as editing.
By utilizing this structure, TYPO3 allows for a clear and organized approach
to managing access rights, ensuring users have just the permissions they need,
linawolf marked this conversation as resolved.
Show resolved Hide resolved
nothing more, nothing less.

.. note::
Role groups inherit permissions from subgroups and should not have any
access configured directly on themselves.
linawolf marked this conversation as resolved.
Show resolved Hide resolved

.. _naming-convention:

Implementing a naming convention for simplified group management
linawolf marked this conversation as resolved.
Show resolved Hide resolved
================================================================

At the moment TYPO3 does not allow grouping backend user groups by some context
linawolf marked this conversation as resolved.
Show resolved Hide resolved
or their purpose. Instead when they are listed (for example in the backend user
linawolf marked this conversation as resolved.
Show resolved Hide resolved
edit form, where we can assign them to the user) they appear sorted by their
linawolf marked this conversation as resolved.
Show resolved Hide resolved
names (ascending). From one side this might be good as you can quickly find
linawolf marked this conversation as resolved.
Show resolved Hide resolved
what you are looking for. On the other hand if you will have a lot of groups
linawolf marked this conversation as resolved.
Show resolved Hide resolved
defined, and you will try to quickly find and select/assign some of them
linawolf marked this conversation as resolved.
Show resolved Hide resolved
to the user, it might be challenging to scroll over a large list.
linawolf marked this conversation as resolved.
Show resolved Hide resolved

The situation might be even worse if there is more than 1 administrator responsible
for group and user permissions management. If there won’t be some conventions
linawolf marked this conversation as resolved.
Show resolved Hide resolved
used to name such groups which all administrators follow, then they might find it
linawolf marked this conversation as resolved.
Show resolved Hide resolved
difficult to figure out what given group is responsible for.
linawolf marked this conversation as resolved.
Show resolved Hide resolved

As mentioned in one of the previous chapters, which detailed various
:ref:`Access Control Options in TYPO3 <_available_acl_options>`,
these options can be categorized into types like access lists, mounts, page permissions,
etc. This categorization can also aid in organizing backend user groups.
linawolf marked this conversation as resolved.
Show resolved Hide resolved
Let’s explore how implementing prefixes in group names can help streamline their organization.

.. _role-group::

Role Group
----------

**ROLE_** or **R_**
Examples: *R_editor*, *R_editor_advanced*, *R_proofreader*

A group representing a specific role, such as editor or proofreader, will
inherit permissions from multiple other groups (aggregates them) to compile
the necessary permissions set.

.. _page-group:

Page Group
----------

**PAGE_GROUP_** or **PG_**
Examples: *PG_website_a*, *PG_website_a_blog*, *PG_website_b*, *PG_website_b_gallery*

Grants permissions to all pages in the pages tree for a given site or only
selected branches of pages in such a tree.
linawolf marked this conversation as resolved.
Show resolved Hide resolved

Those groups will be assigned directly to the pages (see Page Permissions
for more details) following the TSConfig or the Access Module configuration.

.. _database-mount:

Database Mount
--------------

**DATABASE_MOUNT_** or **DBM_**
Examples: *DBM_website_a*, *DBM_website_a_blog*, *DBM_website_b*, *DBM_website_b_gallery*

Specifies which portion (either the entirety or a segment) of the pages tree
will be displayed to the user.

This setting is closely linked to page access permissions — without sufficient
permissions to list the pages, a user will not be able to view the mounted page tree.

.. _file-mount:

File Mount
----------

**FILE_MOUNT_** or **FM_**
Examples: *FM_website_a*, *FM_website_a_blog*, *FM_website_b*, *FM_website_b_gallery*, *FM_shared*

Grants access to the selected folders (File Mounts) within file storages.
linawolf marked this conversation as resolved.
Show resolved Hide resolved

.. _category-mount:

Category Mount
--------------

**CATEGORY_MOUNT_** or **CM_**
Examples: *CM_website_a*, *CM_website_b*

Provides access to system categories, or more precisely, to the entire categories tree or a portion of it.

.. _access-control-lists:

Access Control Lists
--------------------

**ACCESS_CONTROL** or **ACL_**
Examples: *ACL_content_elements*, *ACL_news*, *ACL_news_extended*, *ACL_module_reports*

These groups will constitute the largest segment among all, defining granular
linawolf marked this conversation as resolved.
Show resolved Hide resolved
access to content elements, plugins, modules, fields and more.

.. _file-operations:

File Operations
---------------

**FILE_OPERATION_** or **FO_**
Examples: *FO_all*, *FO_read_write*

Defines the range of allowed operations for files and folders, such as read, write, delete, etc.

.. _limit-to-languages:

Limit to languages
------------------

**LANGUAGE_**
Examples: *L_all*, *L_english_german*, *L_en_pl_de*

Specifies the list of languages available for managing content. Keep in mind
linawolf marked this conversation as resolved.
Show resolved Hide resolved
that you would have to have access to the source language when creating the translation.


As you can see we now have dedicated groups prefixes for Pages access,
linawolf marked this conversation as resolved.
Show resolved Hide resolved
Database Mounts, File Mounts, File Operations, Category Mounts and access
to modules, tables, widgets, languages etc. Remember, these are just examples,
and you could — and should — tailor them to meet your specific needs.
Each group name should be simple and self explaining (tell what permissions it contains).
linawolf marked this conversation as resolved.
Show resolved Hide resolved
linawolf marked this conversation as resolved.
Show resolved Hide resolved

.. figure:: ../../Images/ManualScreenshots/PermissionsManagement/PermissionsManagementPrefixedGroupName.png
:alt: Prefixed group names

Prefixing group names makes them more organized and easier to search within forms

.. note::
Use prefixes or other naming conventions which will allow you to easily
linawolf marked this conversation as resolved.
Show resolved Hide resolved
distinguish backend user groups by their purpose.

Here’s a useful tip for those managing backend groups in your project.
linawolf marked this conversation as resolved.
Show resolved Hide resolved
If you’re implementing naming conventions for groups, you likely have documentation
soee marked this conversation as resolved.
Show resolved Hide resolved
detailing these guidelines. Instead of directing your colleagues to consult
soee marked this conversation as resolved.
Show resolved Hide resolved
the documentation for this information, consider extending the TCA for
the be_groups and be_users tables (and potentially others where the group
soee marked this conversation as resolved.
Show resolved Hide resolved
selection box appears). You can add a field description that outlines
the naming conventions and prefixes used. This approach ensures that anyone
modifying backend group inheritance or assignments will have immediate access
soee marked this conversation as resolved.
Show resolved Hide resolved
to explanations of the naming conventions directly within the interface.
soee marked this conversation as resolved.
Show resolved Hide resolved

.. code-block:: php
:caption: Add description to a form field through TCA

$GLOBALS['TCA']['be_users']['columns']['usergroup']['description'] = 'Prefixes: R_ - Role, PG_ - Page Group, DBM_ - Database Mount, FM_ - File Mount, FO_ - File Operations, CM_ - Category Mount, ACL_ - Access Control';
soee marked this conversation as resolved.
Show resolved Hide resolved

This code demonstrates the assignment of a static description for the usergroup
field in the backend user form. However, you should place it in a translation
file and retrieve it from there for better flexibility and localization support.

Another good practice for managing backend groups is to clearly describe
the purpose or scope of each group. This can be done using the Description
field located within the Notes tab of the backend group form.

.. figure:: ../../Images/ManualScreenshots/PermissionsManagement/PermissionsManagementTCAFieldDescription.png
:alt: TCA field description

Describe the scope or purpose of the group