diff options
Diffstat (limited to 'modules-available/dozmod/inc/pagedozmodlog.inc.php')
-rw-r--r-- | modules-available/dozmod/inc/pagedozmodlog.inc.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/modules-available/dozmod/inc/pagedozmodlog.inc.php b/modules-available/dozmod/inc/pagedozmodlog.inc.php index f31edf5b..80441cd1 100644 --- a/modules-available/dozmod/inc/pagedozmodlog.inc.php +++ b/modules-available/dozmod/inc/pagedozmodlog.inc.php @@ -29,9 +29,13 @@ class Page_dozmod_log extends Page . " LEFT JOIN sat.lecture l ON (l.lectureid = targetid)" . " ORDER BY al.dateline DESC LIMIT 500", array(), true, true); } elseif ($this->action === 'showuser') { - $this->listUser(); + if (User::hasPermission("log.showuser")) { + $this->listUser(); + } } else { - $this->listTarget(); + if (User::hasPermission("log.showtarget")) { + $this->listTarget(); + } } } @@ -44,7 +48,7 @@ class Page_dozmod_log extends Page . ' WHERE userid = :uuid' . ' LIMIT 1', array('uuid' => $this->uuid)); if ($user === false) { - Message:addError('unknown-userid', $this->uuid); + Message::addError('unknown-userid', $this->uuid); Util::redirect('?do=dozmod§ion=actionlog'); } // Mangle date and render @@ -66,7 +70,7 @@ class Page_dozmod_log extends Page // We have to guess what kind of target it is if (!$this->addImageHeader() && !$this->addLectureHeader()) { - Message:addError('unknown-targetid', $this->uuid); + Message::addError('unknown-targetid', $this->uuid); // Keep going, there might still be log entries for a deleted uuid } @@ -150,6 +154,9 @@ class Page_dozmod_log extends Page if ($showTarget) { $data['showTarget'] = true; } + + $data['allowedShowUser'] = User::hasPermission("log.showuser"); + $data['allowedShowTarget'] = User::hasPermission("log.showtarget"); Render::addTemplate('actionlog-log', $data); } |