Remove leave button from grouplist if current user is admin of that group.

This commit is contained in:
Adrian Lang 2009-03-08 01:31:25 +01:00
parent f8d1381717
commit f9a7ae27b8
1 changed files with 4 additions and 2 deletions

View File

@ -164,8 +164,10 @@ class GroupList extends Widget
# XXX: special-case for user looking at own
# subscriptions page
if ($user->isMember($this->group)) {
$lf = new LeaveForm($this->out, $this->group);
$lf->show();
if (!$user->isAdmin($this->group)) {
$lf = new LeaveForm($this->out, $this->group);
$lf->show();
}
} else {
$jf = new JoinForm($this->out, $this->group);
$jf->show();