Skip to content
Permalink
Browse files

MDL-43619 Roles: reset_role_capabilities function destroys overrides

  • Loading branch information...
sammarshallou committed Jan 8, 2014
1 parent 12efa52 commit 3978da9e2fb2e5657703dd167e591e31f9b0692b
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/accesslib.php
@@ -2626,7 +2626,8 @@ function reset_role_capabilities($roleid) {
$systemcontext = context_system::instance();
$DB->delete_records('role_capabilities', array('roleid'=>$roleid));
$DB->delete_records('role_capabilities',
array('roleid'=>$roleid, 'contextid' => $systemcontext->id));
foreach($defaultcaps as $cap=>$permission) {
assign_capability($cap, $permission, $roleid, $systemcontext->id);

0 comments on commit 3978da9

Please sign in to comment.
You can’t perform that action at this time.