From f9a7ae27b8879569a3f0eff478cbd3b650bdca28 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 8 Mar 2009 01:31:25 +0100 Subject: [PATCH] Remove leave button from grouplist if current user is admin of that group. --- lib/grouplist.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/grouplist.php b/lib/grouplist.php index 4c448e250d..8f3b0abd87 100644 --- a/lib/grouplist.php +++ b/lib/grouplist.php @@ -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(); -- 2.39.5