From: x2003bruneau Date: Wed, 22 Nov 2006 20:24:59 +0000 (+0000) Subject: Block the access to aliases and lists pages when the group doesn't have a mail domain X-Git-Tag: xorg/0.9.12~69 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=c77e45f18316c323a0a1eb9a9396f1f9089fb43d;p=platal.git Block the access to aliases and lists pages when the group doesn't have a mail domain git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1129 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/xnetlists.php b/modules/xnetlists.php index 986cad9..fbdde4e 100644 --- a/modules/xnetlists.php +++ b/modules/xnetlists.php @@ -70,6 +70,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } $this->prepare_client($page); $page->changeTpl('xnetlists/index.tpl'); @@ -113,6 +116,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } $this->prepare_client($page); $page->changeTpl('xnetlists/create.tpl'); @@ -188,6 +194,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } $this->prepare_client($page); $page->changeTpl('xnetlists/sync.tpl'); @@ -229,7 +238,9 @@ class XnetListsModule extends ListsModule function handler_aadmin(&$page, $lfull = null) { - if (is_null($lfull)) { + global $globals; + + if (!$globals->asso('mail_domain') || is_null($lfull)) { return PL_NOT_FOUND; } @@ -305,6 +316,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } new_groupadmin_page('xnet/groupe/alias-create.tpl'); if (!Post::has('submit')) { diff --git a/templates/xnetlists/index.tpl b/templates/xnetlists/index.tpl index f11941e..b41fb27 100644 --- a/templates/xnetlists/index.tpl +++ b/templates/xnetlists/index.tpl @@ -90,6 +90,13 @@ croix verte te permet de t'inscrire, apr {foreachelse} Pas de listes pour ce groupe {/foreach} + {if $may_update} + + + {icon name=add title="Créer une liste"} Créer une nouvelle liste + + + {/if}

@@ -100,11 +107,11 @@ t'emp

Voici les alias existants pour le groupe {$asso.nom} :

-{if $alias->total()} Alias + {if $alias->total()} {iterate from=$alias item=a} {if $may_update} @@ -116,10 +123,19 @@ t'emp {/if} {/iterate} + {else} + + Aucun alias pour ce groupe + + {/if} + {if $may_update} + + {/if}
+ + {icon name=add title="Créer une liste"} Créer un nouvel alias + +
-{else} -

Aucun alias pour ce groupe

-{/if} {/if}