MDL-24761 we can safely reset all roles now
authorPetr Skoda <skodak@moodle.org>
Tue, 19 Oct 2010 10:22:59 +0000 (10:22 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 19 Oct 2010 10:22:59 +0000 (10:22 +0000)
admin/roles/manage.php

index 41dcf70..0473b83 100755 (executable)
             break;
 
         case 'reset':
-            if (isset($undeletableroles[$roleid])) {
-                print_error('cannotresetthisrole', '', $baseurl);
-            }
             if (!$confirmed) {
                 // show confirmation
                 echo $OUTPUT->header();
                 die;
             }
 
-            // Do the reset.
+            // Reset context levels for standard archetypes
             if ($roles[$roleid]->archetype) {
                 set_role_contextlevels($roleid, get_default_contextlevels($roles[$roleid]->archetype));
             }
+
+            //reset or delete the capabilities
             reset_role_capabilities($roleid);
 
             // Mark context dirty, log and redirect.