src/Sulu/Bundle/WebsiteBundle/Controller/CacheController.php
private function checkLivePermissionForAllWebspaces()
    {
        foreach ($this->get('sulu_core.webspace.webspace_manager')->getWebspaceCollection() as $webspace) {
            $context = PageAdmin::SECURITY_CONTEXT_PREFIX . $webspace->getKey();
            if (!$this->get('sulu_security.security_checker')->hasPermission($context, PermissionTypes::LIVE)) {
                return false;
            }
        }

        return true;
    }
private function checkLivePermissionForAllWebspaces()
    {
        foreach ($this->get('sulu_core.webspace.webspace_manager')->getWebspaceCollection() as $webspace) {
            $context = PageAdmin::SECURITY_CONTEXT_PREFIX . $webspace->getKey();
            if (!$this->get('sulu_security.security_checker')->hasPermission($context, PermissionTypes::LIVE)) {
                return false;
            }
        }

        return true;
    }
private function checkLivePermissionForAllWebspaces ( ) { foreach ( $ this -> get ( 'sulu_core.webspace.webspace_manager' ) -> getWebspaceCollection ( ) as $ webspace ) { $ context = PageAdmin :: SECURITY_CONTEXT_PREFIX . $ webspace -> getKey ( ) ; if ( ! $ this -> get ( 'sulu_security.security_checker' ) -> hasPermission ( $ context , PermissionTypes :: LIVE ) ) { return false ; } } return true ; }
Check the permissions for all webspaces.
Returns true if the user has live permission in all webspaces.

TODO should be replaced with a single webspace cache clear.

@return bool
Check the permissions for all webspaces . Returns true if the user has live permission in all webspaces .