You are here

function block_access_check_config_form in Block Access 6

Same name and namespace in other branches
  1. 6.2 block_access.module \block_access_check_config_form()
  2. 7 block_access.module \block_access_check_config_form()
1 call to block_access_check_config_form()
block_access_form_alter in ./block_access.module

File

./block_access.module, line 272

Code

function block_access_check_config_form(&$form) {
  $module = $form['module']['#value'];
  $delta = $form['delta']['#value'];
  if (!block_access_can_config_lang($module, $delta)) {
    unset($form['i18n']);
  }
  if (!block_access_can_config_spec($module, $delta)) {
    unset($form['block_settings']);
  }
  if (!block_access_can_config_user($module, $delta)) {
    unset($form['user_vis_settings']);
  }
  if (!block_access_can_config_role($module, $delta)) {
    unset($form['role_vis_settings']);
    unset($form['role_view_settings']);
    unset($form['role_move_settings']);
    unset($form['role_enable_settings']);
    unset($form['role_disable_settings']);
    unset($form['role_delete_settings']);
    unset($form['role_config_settings']);
    unset($form['role_config_lang_settings']);
    unset($form['role_config_spec_settings']);
    unset($form['role_config_user_settings']);
    unset($form['role_config_role_settings']);
    unset($form['role_config_page_settings']);
  }
  if (!block_access_can_config_page($module, $delta)) {
    unset($form['page_vis_settings']);
  }
}