src/Sulu/Bundle/PageBundle/Controller/NodeController.php
private function checkActionParameterSecurity($actionParameter, $locale, $id = null)
    {
        $permission = null;
        switch ($actionParameter) {
            case 'publish':
                $permission = 'live';
                break;
        }

        if (!$permission) {
            return;
        }

        $this->get('sulu_security.security_checker')->checkPermission(
            new SecurityCondition(
                $this->getSecurityContext(),
                $locale,
                $this->getSecuredClass(),
                $id
            ),
            $permission
        );
    }
private function checkActionParameterSecurity($actionParameter, $locale, $id = null)
    {
        $permission = null;
        switch ($actionParameter) {
            case 'publish':
                $permission = 'live';
                break;
        }

        if (!$permission) {
            return;
        }

        $this->get('sulu_security.security_checker')->checkPermission(
            new SecurityCondition(
                $this->getSecurityContext(),
                $locale,
                $this->getSecuredClass(),
                $id
            ),
            $permission
        );
    }
private function checkActionParameterSecurity ( $ actionParameter , $ locale , $ id = null ) { $ permission = null ; switch ( $ actionParameter ) { case 'publish' : $ permission = 'live' ; break ; } if ( ! $ permission ) { return ; } $ this -> get ( 'sulu_security.security_checker' ) -> checkPermission ( new SecurityCondition ( $ this -> getSecurityContext ( ) , $ locale , $ this -> getSecuredClass ( ) , $ id ) , $ permission ) ; }
Checks if the user has the required permissions for the given action with the given locale. The additional
id parameter will also include checks for the document identified by it.

@param string $actionParameter
@param string $locale
@param string $id
Checks if the user has the required permissions for the given action with the given locale . The additional id parameter will also include checks for the document identified by it .