summaryrefslogtreecommitdiff
path: root/lib/grouplist.php
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-03-08 01:31:25 +0100
committerAdrian Lang <mail@adrianlang.de>2009-03-08 01:45:57 +0100
commitf9a7ae27b8879569a3f0eff478cbd3b650bdca28 (patch)
treee4c1faabf6eb8c7c5224f528fd3952f2c2641297 /lib/grouplist.php
parentf8d13817174a63dc8452ed60a00b7d336633fa88 (diff)
Remove leave button from grouplist if current user is admin of that group.
Diffstat (limited to 'lib/grouplist.php')
-rw-r--r--lib/grouplist.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/grouplist.php b/lib/grouplist.php
index 4c448e250..8f3b0abd8 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();