#93460Register provider function for custom permission options
Description
With $GLOBALS[‘TYPO3_CONF_VARS’][‘BE’][‘customPermOptions’] you can provide additional options that backend user groups can get assigned.
Docs: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Examples/CustomPermissions/Index.html
This is done in ext_tables and you have to provide an array of options. However if you want to involve database calls or other expensive operations to determine the available options, it would slow down the whole installation because it would be re-evaluated every time ext_tables is loaded.
It would be better to offer a way to register provider functions, that are only called when needed (in the backend form for backend user groups).
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 2
-
Benni Mack changed Related to #107889 <span data-processor="relativetime" data-value="2026-11-09T12:14:29+00:00" > 11/09/26, 12:14 </span>
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-09T12:15:14+00:00" > 11/09/26, 12:15 </span>
Since TYPO3 v14.0 (#107889) this can be done with the new TCA option itemsProcessors: an extension can register a processor class for be_groups.custom_options in Configuration/TCA/Overrides/be_groups.php. It is only executed when the item list is needed (FormEngine / DataHandler validation), so expensive lookups no longer run on every request, and it works in addition to the static customPermOptions array. Items must use the value format <key>:<item>, which can then be checked with $backendUser->check(‘custom_options’, ‘<key>:<item>‘).</item></key></item></key>
Closing as resolved by #107889; the documentation of custom permissions could mention this approach.