Project

General

Profile

Actions

Feature #52482

closed

Control visibility of modules in the BE

Added by Fabien Udriot over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2013-10-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Currently there is no way to register a BE module without it get
displayed in the BE.

The patch introduces a flag "isDisplayed" in the module configuration
telling not to show a BE module. If flag is omitted, default value is true.

Update: configuration is done by User Tsconfig. Check below for more detail.

As additional notes:

  • As background, I need this feature in the frame of the development of EXT:vidi. I need a way to interact between BE modules without necessarily showing them in the main frame.
  • This option must be obviously documented. Though, I wanted to get feedback beforehand.

Files

2013-10-02_1823.png (140 KB) 2013-10-02_1823.png Fabien Udriot, 2013-10-02 18:36
Actions #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #2

Updated by Fabien Udriot over 10 years ago

How to test?

1. Apply the patch

2. Open EXT:extensionmanager/ext_tables.php

3. Add instruction "'isDisplayed' => FALSE," like below:

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
...,
...,
...,
array(
...
'isDisplayed' => FALSE,
)
);

4. Clear the cache

5. Reload the BE, the Extension Manager is not displayed anymore but still accessible at http://my.host/typo3/mod.php?M=tools_ExtensionmanagerExtensionmanager

The module will still appear as normal in the ACL list in a BE groups obviously.

Actions #3

Updated by Markus Klein over 10 years ago

I don't get your usecase. Can you elaborate a bit more please?

Actions #4

Updated by Fabien Udriot over 10 years ago

Let assume you have extension "A" which has a BE module rendered as expected in the BE. Besides, you have extension "B" which also contains a BE module but must be displayed only in the iframe of "A". Currently, you can not register "B" without it get its own iframe in the BE.

This can also be a Use Case for making Ajax requests in the BE using Extbase and its MVC stack. To my knowledge, there is no other way to have a Ajax Dispatcher as described in this article

For the sake of clarity I have made a screenshot which I hope is clear enough.

Actions #5

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #6

Updated by Gerrit Code Review over 10 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #7

Updated by Philipp Gampe over 10 years ago

IMHO this is more an issue of the dispatcher of extbase, then hiding modules.

You should be able to register actions that can be run from backend, but are no modules.

IMHO this is a hack and should be tackled at a more technical level.

Actions #8

Updated by Fabien Udriot over 10 years ago

Hi Philipp,

Thanks for bringing up this topic on the Core ML.

You should be able to register actions that can be run from backend, but are no modules.
IMHO this is a hack and should be tackled at a more technical level.

I see what you mean. But let say for now it is a pragmatic approach waiting for a more structural refactoring of the Core. This feature is very useful for BE development and can be deprecated / removed any time after we have a more capable ACL system.

As a side note, I know Nico has worked on an approach where he could define very fine grained ACL against Controller / Actions. It may be worth having a look at his implementation.

Why does it reminds me to the security framework of Flow!?

For the time being and following discussion with Helmut's suggestion, I have renamed the flag "hideInMenu".

Actions #9

Updated by Gerrit Code Review over 10 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #10

Updated by Gerrit Code Review over 10 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #11

Updated by Gerrit Code Review over 10 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #12

Updated by Gerrit Code Review over 10 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #13

Updated by Fabien Udriot over 10 years ago

After discussing the topic with Steffen Müller again, it looks this could be achieved by some User TSconfig without touching the (Extbase) BE Module API.

The suggested syntax is the following.

options.hiddenModules = file, help
options.hiddenModules {
    web = func,info
    system = BelogLog
}

For testing the patch, you do the following:

1. Apply the patch of course

2. Add for your current BE User (or another one) some User TSconfig

# Hide main module "file" + "help" 
options.hiddenModules = file, help

# Append configuration to hide sub-module "func" and "info" 
options.hiddenModules.web := addToList(func,info)

# Hide sub-module BELogLog 
options.hiddenModules.system = BelogLog

3. The same can be get by putting in some ext_tables.php which will then apply to all BE Users.

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('options.hiddenModules := addToList(file, help)');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('options.hiddenModules.web := addToList(func,info)');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('options.hiddenModules.system = BelogLog');


While refactoring the patched I have also rename the issue making it more generic "Control visibility of modules in the BE".

As a reminder the patch only influences the visibility of the module and not the access (permission) which still must be done in the ACL as usually.

This all must be documented obviously, but first get it landed before feature freeze.

Actions #14

Updated by Fabien Udriot over 10 years ago

  • Subject changed from Register BE module without showing it to Control visibility of modules in the BE
Actions #15

Updated by Gerrit Code Review over 10 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #16

Updated by Gerrit Code Review over 10 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #17

Updated by Gerrit Code Review over 10 years ago

Patch set 10 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #18

Updated by Gerrit Code Review over 10 years ago

Patch set 11 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #19

Updated by Gerrit Code Review over 10 years ago

Patch set 12 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24274

Actions #20

Updated by Fabien Udriot over 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #21

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF