Skip to content
Snippets Groups Projects
Commit 910f69de authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-3921: updating content access form to save roles after revoking/granting permissions

parent 5c2d828b
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ class UwContentAccessForm extends FormBase {
}
}
// Increment the row counter.
// Increment the row count.
$row_count++;
// Set the functionality column.
......@@ -116,10 +116,11 @@ class UwContentAccessForm extends FormBase {
}
}
// The submit button.
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => $this->t('Submit'),
'#value' => $this->t('Save permissions'),
'#button_type' => 'primary',
);
......@@ -186,6 +187,14 @@ class UwContentAccessForm extends FormBase {
}
}
}
// Step through each of the roles and save the role object,
// so that the permissions get saved.
foreach ($uw_role_objects as $uw_role_object) {
// Save the role object.
$uw_role_object->save();
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment