From 1673e8e7ef1715af65540c97fe52ca67718d6f77 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 31 Mar 2012 15:48:02 +0100 Subject: [PATCH] et perm --- contrib/et/main.php | 4 ++-- core/userclass.class.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/et/main.php b/contrib/et/main.php index 63545b08..44245c6a 100644 --- a/contrib/et/main.php +++ b/contrib/et/main.php @@ -16,7 +16,7 @@ class ET extends Extension { public function onPageRequest(PageRequestEvent $event) { global $user; if($event->page_matches("system_info")) { - if($user->is_admin()) { + if($user->can("view_sysinfo")) { $this->theme->display_info_page($this->get_info()); } } @@ -24,7 +24,7 @@ class ET extends Extension { public function onUserBlockBuilding(UserBlockBuildingEvent $event) { global $user; - if($user->is_admin()) { + if($user->can("view_sysinfo")) { $event->add_link("System Info", make_link("system_info")); } } diff --git a/core/userclass.class.php b/core/userclass.class.php index 8b12d9af..67daee49 100644 --- a/core/userclass.class.php +++ b/core/userclass.class.php @@ -85,6 +85,7 @@ new UserClass("base", null, array( "edit_feature" => False, "bulk_edit_vote" => False, "edit_other_vote" => False, + "view_sysinfo" => False, "protected" => False, # only admins can modify protected users (stops a moderator changing an admin's password) )); @@ -136,6 +137,7 @@ new UserClass("admin", "base", array( "edit_feature" => True, "bulk_edit_vote" => True, "edit_other_vote" => True, + "view_sysinfo" => True, "protected" => True, ));