Skip to content
Snippets Groups Projects
Commit ff9942eb authored by Vincent Massaro's avatar Vincent Massaro Committed by Pascal Morin
Browse files

Issue #3021323 by vinmassaro, bellesmanieres: Disable core permissions rebuild...

Issue #3021323 by vinmassaro, bellesmanieres: Disable core permissions rebuild form if cron processing is enabled
parent 8a190e91
No related branches found
No related tags found
No related merge requests found
......@@ -149,3 +149,16 @@ function _drush_node_access_rebuild_progressive_process(int $total, int $process
}
drush_print(dt('Processed @pass of @nodes nodes (@processed/@total).', $figures));
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function node_access_rebuild_progressive_form_node_configure_rebuild_confirm_alter(&$form) {
$config = \Drupal::config('node_access_rebuild_progressive.settings');
$form['description']['#markup'] = '<p>This form has been disabled by the node_access_rebuild_progressive module.</p>';
$form['description']['#markup'] .= '<p>You can manually rebuild the permissions using Drush: <strong>drush node-access-rebuild-progressive</strong>.</p>';
if ($config->get('cron')) {
$form['description']['#markup'] .= '<p>Else they will be rebuilt incrementally during Drupal cron run.</p>';
}
$form['#disabled'] = TRUE;
}
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