Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Breaking: #97135 - web-info - Removed support for module handling bas…
Browse files Browse the repository at this point in the history
…ed on TBE_M… (#463)

* Breaking: #97135 - Removed support for module handling based on TBE_MODULES_EXT

References TYPO3-Documentation/Changelog-To-Doc#3
Releases: main, 12.4

* Breaking: #97135 - Removed support for module handling based on TBE_MODULES_EXT

References TYPO3-Documentation/Changelog-To-Doc#3
Releases: main, 12.4

* [TASK] Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Chris Müller <[email protected]>

---------

Co-authored-by: Chris Müller <[email protected]>
  • Loading branch information
linawolf and brotkrueml authored Apr 21, 2024
1 parent 461123f commit 0f747f7
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 73 deletions.
7 changes: 6 additions & 1 deletion Documentation/PageTsconfig/Mod.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ Properties
:maxdepth: 1
:glob:

Mod/*
Mod/Shared
Mod/WebInfo
Mod/WebLayout
Mod/WebList
Mod/WebView
Mod/Wizards
49 changes: 19 additions & 30 deletions Documentation/PageTsconfig/Mod/WebInfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,41 +74,30 @@ Example: Override the field definitions in the info module
menu.function
=============

.. confval:: menu.function
:name: mod-web-info-menu-function
:type: array

Disable elements of the "Function selector" in the document header of the module. The keys for single
items can be found by browsing *System > Configuration > $GLOBALS['TBE_MODULES_EXT']*.
.. versionchanged:: 12.0
The page TSconfig option :tsconfig:`mod.web_info.menu.function` has been removed
with TYPO3 v12.0. Use **user** TSconfig option
:ref:`options.hideModules <useroptions-hideModules>` instead.

.. figure:: /Images/ManualScreenshots/Info/FunctionMenuInfoModule.png
:alt: The function menu of the Info module
.. _pageblindingfunctionmenuoptions-webinfo-migration:

The function menu of the Info module
Migration from menu.function to options.hideModules
---------------------------------------------------

.. warning::
Migrate former usage of :tsconfig:`mod.web_info.menu.function` in **page** TSconfig
to option :ref:`options.hideModules <useroptions-hideModules>`.

Blinding the function menu items is not hardcore access control! All it
does is hide the possibility of accessing that module functionality
from the interface. It might be possible for users to hack their way
around it and access the functionality anyways. You should use the
option of blinding elements mostly to remove otherwise distracting options.

.. _pageblindingfunctionmenuoptions-webinfo-example:
.. code-block:: typoscript
:caption: **Page** TSconfig, for example EXT:my_extension/Configuration/page.tsconfig
Example: Remove some options from the functions menu
----------------------------------------------------
# before
mod.web_info.menu.function.TYPO3\CMS\Info\Controller\TranslationStatusController = 0
.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
:caption: **User** TSconfig, for example EXT:my_extension/Configuration/user.tsconfig
mod.web_info.menu.function {
# Disable item "Log"
TYPO3\CMS\Belog\Module\BackendLogModuleBootstrap = 0
# Disable item "Pagetree Overview"
TYPO3\CMS\Info\Controller\PageInformationController = 0
# Disable item "Localization Overview"
TYPO3\CMS\Info\Controller\TranslationStatusController = 0
# Disable item "Linkvalidator"
TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport = 0
}
# after
options.hideModules := addToList(web_info_translations)
See also :ref:`setting-user-tsconfig`. You can find the names of all
TypoScript modules in :t3src:`info/Configuration/Backend/Modules.php`.
62 changes: 33 additions & 29 deletions Documentation/PageTsconfig/Mod/WebTs.rst
Original file line number Diff line number Diff line change
@@ -1,48 +1,52 @@
.. include:: /Includes.rst.txt
:orphan:
.. include:: /Includes.rst.txt

======
web_ts
======

Configuration options of the "Web > Template" module.
.. versionchanged:: 12.0
The :guilabel:`Web > Template` module has been replaced by the
:guilabel:`Web > TypoScript` module. The only option in this namespace
has been removed.

.. contents::
:local:
.. contents::
:local:

.. index::
web_info.menu.function
Module menu; Template
.. _pageblindingfunctionmenuoptions-webts:
.. index::
web_info.menu.function
Module menu; Template
.. _pageblindingfunctionmenuoptions-webts:

menu.function
=============

:aspect:`Datatype`
array
.. versionchanged:: 12.0
The TSconfig option :tsconfig:`mod.web_ts.menu.function` has been removed
with TYPO3 v12.0. Use **user** TSconfig option
:ref:`options.hideModules <useroptions-hideModules>` instead.

:aspect:`Description`
Disable elements of the "Function selector" in the document header of the module. The keys for single
items can be found by browsing *System > Configuration > $GLOBALS['TBE_MODULES_EXT']*.
.. _pageblindingfunctionmenuoptions-webts-migration:

.. figure:: /Images/ManualScreenshots/Template/FunctionMenuTemplateModule.png
:alt: The function menu of the Template module
Migration from menu.function to options.hideModules
---------------------------------------------------

The function menu of the Template module
Migrate former usage of :tsconfig:`mod.web_ts.menu.function` in **page** TSconfig
to option :ref:`options.hideModules <useroptions-hideModules>`.

.. warning::
.. code-block:: typoscript
:caption: **Page** TSconfig, for example EXT:my_extension/Configuration/page.tsconfig
Blinding Function Menu items is not hardcore access control! All it
does is hide the possibility of accessing that module functionality
from the interface. It might be possible for users to hack their way
around it and access the functionality anyways. You should use the
option of blinding elements mostly to remove otherwise distracting options.
# before
mod.web_ts.menu.function {
TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController = 0
}
:aspect:`Example`
.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
.. code-block:: typoscript
:caption: **User** TSconfig, for example EXT:my_extension/Configuration/user.tsconfig
# Disable the item "Template Analyzer"
mod.web_ts.menu.function {
TYPO3\CMS\Tstemplate\Controller\TemplateAnalyzerModuleFunctionController = 0
}
# after
options.hideModules := addToList(web_typoscript_analyzer)
See also :ref:`setting-user-tsconfig`. You can find the names of all
TypoScript modules in :t3src:`tstemplate/Configuration/Backend/Modules.php`.
25 changes: 12 additions & 13 deletions Documentation/UsingSetting/UserTSconfig.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,27 +200,26 @@ When a page TSconfig property is set in **user** TSconfig that way, regardless
of whether it is in the TSconfig field of a
group or a user, it **overrides** the value of the according **page** TSconfig property.

To illustrate this feature let's say the action
:guilabel:`Web > Info > Localization Overview` has been disabled via Page
TSconfig:
To illustrate this feature let's say new pages and copied pages are not hidden
by default:

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
mod.web_info.menu.function {
TYPO3\CMS\Info\Controller\TranslationStatusController = 0
}
TCAdefaults.pages.hidden = 0
TCEMAIN.table.pages.disableHideAtCopy = 1
If we activate this configuration in the TSconfig of a certain backend user, that
user would still be able to select this menu item because the value of his user TSconfig
overrides the same value set in the page TSconfig, just prefixed with
:typoscript:`page.`:
If we activate the following configuration in the user TSconfig of a certain backend
user group, new and copied pages will be hidden for that group. The user TSconfig to
be used is the same, but prefixed with :tsconfig:`page.`

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/user.tsconfig
:caption: EXT:site_package/Configuration/TSconfig/editors.tsconfig
page.mod.web_info.menu.function {
TYPO3\CMS\Info\Controller\TranslationStatusController = 1
// Override the settings from the page TSconfig for the editors usergroup
page {
TCAdefaults.pages.hidden = 1
TCEMAIN.table.pages.disableHideAtCopy = 0
}
.. attention::
Expand Down

0 comments on commit 0f747f7

Please sign in to comment.