diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php index fe0e6143..b5047643 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php @@ -175,7 +175,7 @@ class GroupController extends Controller if(!$data->getFgall()) $action .="$data->getId()))."'>"; if($data->getFgcanshare()) - $action.="$data->getId()))."'>"; + $action.="$data->getId()))."'>"; } else { $fgproprio=($user==$data->getOwner()); @@ -194,11 +194,16 @@ class GroupController extends Controller $action .="$data->getId()))."'>"; } else { - $action.="$data->getId()))."'>"; + // On ne peut se désinscrire que si le groupe est ouvert et qu'il n'est pas lié à un groupe ldap ou sso + $fgcanleave=true; + if($data->getFgtemplate() or $data->getFgall()) $fgcanleave=false; + elseif(!$data->getFgcanshare() && !$data->getFgopen()) $fgcanleave=false; + elseif($data->getFgcanshare() && !$this->get('session')->get('permunsubscribe') && !$data->getFgopen()) $fgcanleave=false; + if($fgcanleave) $action.="$data->getId()))."'>"; } if($data->getFgcanshare()) - $action.="$data->getId()))."'>"; + $action.="$data->getId()))."'>"; } diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig index 7a8e0202..be686877 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig @@ -17,6 +17,7 @@