Coder Social home page Coder Social logo

josefglatz / beuser_fastswitch Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 4.0 266 KB

TYPO3 Backend Mode: Fast backend user switch for TYPO3 CMS administrator users

Home Page: https://typo3.org/extensions/repository/view/beuser_fastswitch

License: GNU General Public License v3.0

PHP 64.14% HTML 21.86% CSS 6.86% JavaScript 7.15%
typo3 typo3-cms-extension productivity-booster typo3-cms-backend typo3-v11-lts typo3-v12

beuser_fastswitch's People

Contributors

andreaskienast avatar georgringer avatar josefglatz avatar tdeuling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

beuser_fastswitch's Issues

Remove deprecated getTSConfig() method of TYPO3 core

=============================================================
Deprecation: #84993 - Deprecate some TSconfig related methods
=============================================================

See :issue:`84993`

Description
===========

Some user TSconfig related methods have been deprecated:

* :php:`TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfigVal()`
* :php:`TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfigProp()`

Changed method signatures:

* :php:`TYPO3\CMS\core\Authentication\BackendUserAuthentication->getTSConfig()`, no argument allowed any longer

Some page TSconfig related methods have been marked as deprecated:

* :php:`TYPO3\CMS\backend\Utility\BackendUtility::getModTSconfig()`
* :php:`TYPO3\CMS\backend\Utility\BackendUtility::unsetMenuItems()`
* :php:`TYPO3\CMS\backend\Tree\View\PagePositionMap->getModConfig()`
* :php:`TYPO3\CMS\core\DataHandling\DataHandler->getTCEMAIN_TSconfig()`

These properties have been set to protected, should not be used any longer and trigger a deprecation error on access:

* :php:`TYPO3\CMS\backend\Tree\View\PagePositionMap->getModConfigCache`
* :php:`TYPO3\CMS\backend\Tree\View\PagePositionMap->modConfigStr`


Impact
======

Calling the above methods will trigger a PHP :php:`E_USER_DEPRECATED` error.


Affected Installations
======================

Extensions with backend modules may call these methods. The extension scanner
will find affected code occurrences in extensions.


Migration
=========

Change user TSconfig related calls to use :php:`BackendUserAuthentication->getTSConfig()`
instead, it comes with a slightly changed return syntax.

:php:`getTSConfig()` without arguments simply returns the entire user TSconfig as array, similar to other
methods that return parsed TypoScript arrays. The examples below show some imaginary user TSConfig,
the full parsed array returned by :php:`getTSConfig()` and some typical access patterns with fallback. Note
it's almost always useful to use the null coalescence :php:`??` operator for a fallback value to suppress
PHP notice level warnings::

    // Incoming user TSconfig:
    // options.someToggle = 1
    // options.somePartWithSubToggles = foo
    // options.somePartWithSubToggles.aValue = bar

    // Parsed array returned by getTSConfig(), note the dot if a property has sub keys:
    // [
    //     'options.' => [
    //         'someToggle' => '1',
    //         'somePartWithSubToggles' => 'foo',
    //         'somePartWithSubToggles.' => [
    //             'aValue' => 'bar',
    //         ],
    //     ],
    // ],
    $userTsConfig = $backendUserAuthentication->getTSConfig():

    // Typical call to retrieve a sanitized value:
    $isToggleEnabled = (bool)($userTsConfig['options.']['someToggle'] ?? false);

    // And to retrieve a sub set, note the dot at the end:
    $subArray = $userTsConfig['options.']['somePartWithSubToggles.'] ?? [];

    // Switch an old getTSConfigVal() to getTSConfig(), note the parenthesis:
    $value = (bool)$backendUser->getTSConfigVal('options.someToggle');
    $value = (bool)($backendUser->getTSConfig()['options.']['someToggle'] ?? false);

    // Switch an old getTSConfigProp() to getTSConfig(), note the parenthesis and the trailing dot:
    $value = (array)$backendUser->getTSConfigProp('options.somePartWithSubToggles');
    $value = (array)($backendUser->getTSConfig()['options.']['somePartWithSubToggles.'] ?? []);


Change :php:`BackendUtility->getModTSconfig()` related calls to use :php:`BackendUtility::getPagesTSconfig($pid)` instead.
Note this method does not return the 'properties' and 'value' sub array as :php:`->getModTSconfig()` did::

    // Switch an old getModTSconfig() to getPagesTSConfig():
    $configArray = BackendUtility::getModTSconfig($id, 'mod.web_list');
    $configArray['properties'] = BackendUtility::getPagesTSconfig($pid)['mod.']['web_list.'] ?? [];

Methods :php:`BackendUtility::unsetMenuItems()` and :php:`DataHandler->getTCEMAIN_TSconfig()` have been rarely used
and are dropped without substitution. Copy the code into consuming methods if you really need them.

.. index:: Backend, PHP-API, TSConfig, FullyScanned

RFC: Option to add sub directories

Here's the scenarion:

At the office we have decided to have for each CType own files as far as possible.

  • XLF
  • TCA/Overrides
  • PageTS

etc.

To keep it straight forward, it would be neat to create a sub directory within Language where we keep solely the XLF files for each CType. However, currently only the Language dir itself is considered.

RFC: Show user groups or a different kind of info

Especially when dealing with lots of users and different kinds of access rights it can be tedious to find the user you want to use, to verify your modified access rights work as expected.

Therefor an other information such as associated user groups, or a custom note could be helpful. Or, perhaps an option to star specific users.

Remove deprecated Fluid Class Aliases method of TYPO3 core

=========================================
Deprecation: #87277 - Fluid Class Aliases
=========================================

See :issue:`87277`

Description
===========

Since introduction of the standalone package typo3fluid/fluid, the TYPO3 core provides class aliases
for the moved classes to ease usage in extensions.
These class aliases will be dropped in TYPO3 v10.

The following class aliases have been marked as deprecated and should no longer be used:

* :php:`TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler`
* :php:`TYPO3\CMS\Fluid\Core\Exception`
* :php:`TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode`
* :php:`TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface`
* :php:`TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface`
* :php:`TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode`
* :php:`TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode`
* :php:`TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface`
* :php:`TYPO3\CMS\Fluid\Core\Variables\CmsVariableProvider`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\Exception`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\Facets\PostParseInterface`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\TagBuilder`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperInterface`
* :php:`TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer`
* :php:`TYPO3\CMS\Fluid\View\Exception`
* :php:`TYPO3\CMS\Fluid\View\Exception\InvalidSectionException`
* :php:`TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException`

Impact
======

Extensions and third party packages using the :php:`TYPO3\CMS\Fluid` namespace might be affected
by the stand alone Fluid package change.
If aliased class names are used, there will be fatal PHP Errors after update to TYPO3 v10.

The extension scanner will find usage of these classes.

Affected Installations
======================

All installations that use the :php:`TYPO3\CMS\Fluid` namespace for class aliases.

Migration
=========

Migrate to the original classes in namespace :php:`TYPO3Fluid\Fluid`.

.. index:: PHP-API, FullyScanned, ext:fluid

Type Error after installation

Type Error nach Installation

  • Type Error in Query::LogicalAnd()

TYPO3\CMS\Extbase\Persistence\Generic\Query::logicalAnd(): Argument 1 must be of type TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface, array given, called in /var/www/html/typo3conf/ext/beuser_fastswitch/Classes/Domain/Repository/BackendUserRepository.php on line 93

remove deprecated CMS ViewHelper base classes removed in TYPO3 core

======================================================
Breaking: #82414 - CMS ViewHelper base classes removed
======================================================

See :issue:`82414`

Description
===========

The following ViewHelper base classes have been removed:

- :php:`TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper`
- :php:`TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper`
- :php:`TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper`
- :php:`TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition`

Aliases are in place, but the following key differences may break your code:

- Render method arguments are no longer possible at all
- The property :php:`$this->controllerContext` is no longer defined


Impact
======

Render method arguments have been deprecated for a long time and should already have been migrated
in your code. If you still have ViewHelpers using render method arguments, these will break
after this change.


Affected Installations
======================

All instances which use a ViewHelper that either contains render method arguments, extends from one
of the base classes above, or or accesses :php:`$this->controllerContext`.


Migration
=========

Migrate to use `renderStatic` methods (see examples in TYPO3 Core, EXT:fluid) to not use
render method arguments.

ViewHelpers which access :php:`$this->controllerContext` can instead access
:php:`$this->renderingContext->getControllerContext()`.

Instead of using the (now removed) abstract classes from ext:fluid, use the classes
supplied in :file:`vendor/typo3fluid/fluid`:

* :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper`
* :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper`
* :php:`TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper`
* :php:`TYPO3Fluid\Fluid\Core\ViewHelper\ArgumentDefinition`

and change your code accordingly.

Migrating this can be done with search-and-replace for all common use cases.

.. index:: Fluid, NotScanned

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.