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 0e088ae commit bf2c42e8eecda043d371b7f3c6ca12cdd4601a23
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 bf2c42e

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