public function clearPermissionsPageAction(Request $request)
    {
        $page = $request->attributes->get('uid');
        $group = $request->attributes->get('group');

        $aclManager = $this->getContainer()->get('security.acl_manager');
        $securityIdentity = new UserSecurityIdentity($group, 'BackBee\Security\Group');

        try{

            if(true === $page->isRoot()){

                try{
                    $aclManager->deleteClassAce(new ObjectIdentity('all', $page->getType()), $securityIdentity);
                }
                catch(\Exception $e){
                    // do nothing
                }
            }
            else{
                $aclManager->deleteObjectAce($page, $securityIdentity);
            }
        }
        catch (\Exception $e){
            // do nothing
        }

        return $this->createJsonResponse([], 200);
    }
public function clearPermissionsPageAction(Request $request)
    {
        $page = $request->attributes->get('uid');
        $group = $request->attributes->get('group');

        $aclManager = $this->getContainer()->get('security.acl_manager');
        $securityIdentity = new UserSecurityIdentity($group, 'BackBee\Security\Group');

        try{

            if(true === $page->isRoot()){

                try{
                    $aclManager->deleteClassAce(new ObjectIdentity('all', $page->getType()), $securityIdentity);
                }
                catch(\Exception $e){
                    // do nothing
                }
            }
            else{
                $aclManager->deleteObjectAce($page, $securityIdentity);
            }
        }
        catch (\Exception $e){
            // do nothing
        }

        return $this->createJsonResponse([], 200);
    }
public function clearPermissionsPageAction ( Request $ request ) { $ page = $ request -> attributes -> get ( 'uid' ) ; $ group = $ request -> attributes -> get ( 'group' ) ; $ aclManager = $ this -> getContainer ( ) -> get ( 'security.acl_manager' ) ; $ securityIdentity = new UserSecurityIdentity ( $ group , 'BackBee\Security\Group' ) ; try { if ( true === $ page -> isRoot ( ) ) { try { $ aclManager -> deleteClassAce ( new ObjectIdentity ( 'all' , $ page -> getType ( ) ) , $ securityIdentity ) ; } catch ( \ Exception $ e ) { // do nothing } } else { $ aclManager -> deleteObjectAce ( $ page , $ securityIdentity ) ; } } catch ( \ Exception $ e ) { // do nothing } return $ this -> createJsonResponse ( [ ] , 200 ) ; }
Clear permissions for an page

@Rest\ParamConverter(name="uid", class="BackBee\NestedNode\Page")

@Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")

@param Request $request
@return JsonResponse
Clear permissions for an page