public function processResources(array &$configuration)
    {
        if (!isset($configuration['resources']) || !is_array($configuration['resources'])) {
            return;
        }
        $newPrivilegeTargetConfiguration = array();
        foreach ($configuration['resources'] as $resourceType => $resourceConfiguration) {
            switch ($resourceType) {
                case 'methods':
                    $privilegeClassName = 'TYPO3\\Flow\\Security\\Authorization\\Privilege\\Method\MethodPrivilege';
                    if (!isset($newPrivilegeTargetConfiguration[$privilegeClassName])) {
                        $newPrivilegeTargetConfiguration[$privilegeClassName] = array();
                    }
                    foreach ($resourceConfiguration as $resourceName => $resourceMatcher) {
                        $newPrivilegeTargetConfiguration[$privilegeClassName][$resourceName] = array(
                            'matcher' => $resourceMatcher,
                        );
                    }
                    break;
                case 'entities':
                    $privilegeClassName = 'TYPO3\\Flow\\Security\\Authorization\\Privilege\\Entity\\Doctrine\\EntityPrivilege';
                    foreach ($resourceConfiguration as $entityType => $entityConfiguration) {
                        if (!isset($newPrivilegeTargetConfiguration[$privilegeClassName])) {
                            $newPrivilegeTargetConfiguration[$privilegeClassName] = array();
                        }
                        foreach ($entityConfiguration as $resourceName => $resourceMatcher) {
                            $newPrivilegeTargetConfiguration[$privilegeClassName][$resourceName] = array(
                                'matcher' => $this->convertEntityResourceMatcher($entityType, $resourceMatcher)
                            );
                        }
                    }
                    break;
                default:
                    $this->showWarning('Resource type "' . $resourceType . '" is not supported...');
            }
        }
        unset($configuration['resources']);
        $configuration['privilegeTargets'] = $newPrivilegeTargetConfiguration;
    }
public function processResources(array &$configuration)
    {
        if (!isset($configuration['resources']) || !is_array($configuration['resources'])) {
            return;
        }
        $newPrivilegeTargetConfiguration = array();
        foreach ($configuration['resources'] as $resourceType => $resourceConfiguration) {
            switch ($resourceType) {
                case 'methods':
                    $privilegeClassName = 'TYPO3\\Flow\\Security\\Authorization\\Privilege\\Method\MethodPrivilege';
                    if (!isset($newPrivilegeTargetConfiguration[$privilegeClassName])) {
                        $newPrivilegeTargetConfiguration[$privilegeClassName] = array();
                    }
                    foreach ($resourceConfiguration as $resourceName => $resourceMatcher) {
                        $newPrivilegeTargetConfiguration[$privilegeClassName][$resourceName] = array(
                            'matcher' => $resourceMatcher,
                        );
                    }
                    break;
                case 'entities':
                    $privilegeClassName = 'TYPO3\\Flow\\Security\\Authorization\\Privilege\\Entity\\Doctrine\\EntityPrivilege';
                    foreach ($resourceConfiguration as $entityType => $entityConfiguration) {
                        if (!isset($newPrivilegeTargetConfiguration[$privilegeClassName])) {
                            $newPrivilegeTargetConfiguration[$privilegeClassName] = array();
                        }
                        foreach ($entityConfiguration as $resourceName => $resourceMatcher) {
                            $newPrivilegeTargetConfiguration[$privilegeClassName][$resourceName] = array(
                                'matcher' => $this->convertEntityResourceMatcher($entityType, $resourceMatcher)
                            );
                        }
                    }
                    break;
                default:
                    $this->showWarning('Resource type "' . $resourceType . '" is not supported...');
            }
        }
        unset($configuration['resources']);
        $configuration['privilegeTargets'] = $newPrivilegeTargetConfiguration;
    }
public function processResources ( array & $ configuration ) { if ( ! isset ( $ configuration [ 'resources' ] ) || ! is_array ( $ configuration [ 'resources' ] ) ) { return ; } $ newPrivilegeTargetConfiguration = array ( ) ; foreach ( $ configuration [ 'resources' ] as $ resourceType => $ resourceConfiguration ) { switch ( $ resourceType ) { case 'methods' : $ privilegeClassName = 'TYPO3\\Flow\\Security\\Authorization\\Privilege\\Method\MethodPrivilege' ; if ( ! isset ( $ newPrivilegeTargetConfiguration [ $ privilegeClassName ] ) ) { $ newPrivilegeTargetConfiguration [ $ privilegeClassName ] = array ( ) ; } foreach ( $ resourceConfiguration as $ resourceName => $ resourceMatcher ) { $ newPrivilegeTargetConfiguration [ $ privilegeClassName ] [ $ resourceName ] = array ( 'matcher' => $ resourceMatcher , ) ; } break ; case 'entities' : $ privilegeClassName = 'TYPO3\\Flow\\Security\\Authorization\\Privilege\\Entity\\Doctrine\\EntityPrivilege' ; foreach ( $ resourceConfiguration as $ entityType => $ entityConfiguration ) { if ( ! isset ( $ newPrivilegeTargetConfiguration [ $ privilegeClassName ] ) ) { $ newPrivilegeTargetConfiguration [ $ privilegeClassName ] = array ( ) ; } foreach ( $ entityConfiguration as $ resourceName => $ resourceMatcher ) { $ newPrivilegeTargetConfiguration [ $ privilegeClassName ] [ $ resourceName ] = array ( 'matcher' => $ this -> convertEntityResourceMatcher ( $ entityType , $ resourceMatcher ) ) ; } } break ; default : $ this -> showWarning ( 'Resource type "' . $ resourceType . '" is not supported...' ) ; } } unset ( $ configuration [ 'resources' ] ) ; $ configuration [ 'privilegeTargets' ] = $ newPrivilegeTargetConfiguration ; }
Replaces the "resource" configuration by the new "privilegeTargets" syntax

@param array $configuration
@return void
Replaces the resource configuration by the new privilegeTargets syntax