Asset widget frame load for fields, which disabled. For example, create new content type. Configure default body field for use assets. Open node creation form of this content type, if field exist on this form, then Asset widget frame will be loaded - it's ok. But when user has no access to field, Asset widget frame loaded in any case - no ok.

/**
 * Implements hook_form_alter().
 */
function custom_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'page_node_form') {
    $form['body']['#access'] = FALSE;
  }
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zestagio created an issue. See original summary.

zestagio’s picture

Status: Active » Needs review
FileSize
763 bytes