Skip to content

AIM - Backend Module visible for users which did not have the right to access #17

@samamedick

Description

@samamedick

Problem:
The Module "aim" is visible for users which did not have access. They could not see the content, when following the link.

Reason:
appearance.dependsOnSubmodules is not a TYPO3 13 core feature — searching vendor/typo3/cms-backend/Classes/Module/ shows it's never read. The "hide parent if no submodules accessible" auto-cleanup happens only for
top-level modules (ModuleProvider::getModulesForModuleMenu line 158-161), and aim is a submodule of tools/admin — so it stays visible for editors with an empty children list.

Solution add in Modules.php:

'aim' => [ 
  ...    
  'parent' => (new Typo3Version())->getMajorVersion() >= 14 ? 'admin' : 'tools',   
  ...

Or override in own extension, i.e. Modules.php:

    ...
    // Override b13/aim parent module: upstream omits 'access', so the entry
    // is visible to every backend user even though both submodules are admin-only
    // ('appearance.dependsOnSubmodules' is not honored by TYPO3 13 core).
    'aim' => [
        'parent' => 'tools',
        'access' => 'admin',
        'position' => ['before' => '*'],
        'appearance' => [
            'dependsOnSubmodules' => true,
        ],
        'showSubmoduleOverview' => true,
        'labels' => [
            'title' => 'LLL:EXT:aim/Resources/Private/Language/locallang_module.xlf:aim.title',
            'description' => 'LLL:EXT:aim/Resources/Private/Language/locallang_module.xlf:aim.description',
            'shortDescription' => 'LLL:EXT:aim/Resources/Private/Language/locallang_module.xlf:aim.shortDescription',
        ],
        'iconIdentifier' => 'tx-aim',
    ],
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions