forked from JanBartels/be_acl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ext_localconf.php
72 lines (60 loc) · 2.91 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
if (! defined('TYPO3_MODE')) {
die ('Access denied.');
}
call_user_func(function () {
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
)->get('be_acl');
$isRedisEnabled = extension_loaded('redis') && $extensionConfiguration['enableRedis'];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
options.saveDocNew.tx_beacl_acl=1
');
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['calcPerms'][] =
\JBartels\BeAcl\Utility\UserAuthGroup::class .'->calcPerms'
;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'][] =
\JBartels\BeAcl\Utility\UserAuthGroup::class .'->getPagePermsClause'
;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Beuser\Controller\PermissionController::class] = [
'className' => \JBartels\BeAcl\Controller\PermissionController::class,
];
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] =
\JBartels\BeAcl\Hook\DataHandlerHook::class
;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] =
\JBartels\BeAcl\Hook\DataHandlerHook::class
;
// set tx_be_acl_timestamp-cache
if (! isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_timestamp']['frontend'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_timestamp']['frontend'] =
'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend'
;
}
if (! isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_timestamp']['backend'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_timestamp']['backend'] = $isRedisEnabled
? \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class
: \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class
;
}
// set tx_be_acl_permissions-cache
if (! isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_permissions']['frontend'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_permissions']['frontend'] =
'TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend'
;
}
if (! isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_permissions']['backend'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_be_acl_permissions']['backend'] = $isRedisEnabled
? \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class
: \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class
;
}
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'tx_beacl-object-info',
\TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
[
'name' => 'info'
]
);
});