public function canEditPwsPerm(TokenInterface $token)
    {
        if ($this->container->get('security.context')->isGranted('ROLE_ADMIN')) return true;

        $roles = $this->roleManager->getStringRolesFromToken($token);
        $accesses = $this->om
            ->getRepository('ClarolineCoreBundle:Resource\PwsRightsManagementAccess')
            ->findByRoles($roles);

        foreach ($accesses as $access) {
            if ($access->isAccessible()) return true;
        }

        return false;
    }