From: tjhunt <tjhunt>
Date: Mon, 24 Nov 2008 08:19:33 +0000 (+0000)
Subject: override roles: MDL-8313 followup - don't show capabilities you can't change the... 
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e494fbf1716d18d65d67c6b6f273c05aa6a477fb;p=moodle.git

override roles: MDL-8313 followup - don't show capabilities you can't change the override of in basic mode.
---

diff --git a/admin/roles/lib.php b/admin/roles/lib.php
index 517de9886a..b2fccaedde 100644
--- a/admin/roles/lib.php
+++ b/admin/roles/lib.php
@@ -904,6 +904,10 @@ class override_permissions_table_basic extends override_permissions_table_advanc
         $this->stradvmessage = get_string('useshowadvancedtochange', 'role');
     }
 
+    protected function skip_row($capability) {
+        return is_legacy($capability->name) || $capability->locked;
+    }
+
     protected function add_permission_cells($capability) {
         if ($this->permissions[$capability->name] == CAP_PROHIBIT) {
             $permname = $this->allpermissions[CAP_PROHIBIT];