You are here

function flexiaccess_page_submit in Flexi Access 7

Commit updates for node form.

File

./flexiaccess.nodes.inc, line 90
Form handling for per node ACL.

Code

function flexiaccess_page_submit($form, &$form_state) {
  $node = $form_state['node'];
  if (module_exists('acl')) {
    foreach (array(
      'view',
      'update',
      'delete',
    ) as $op) {
      if (isset($form_state['values']['acl'][$op])) {
        acl_save_form($form_state['values']['acl'][$op]);
      }
    }
  }

  // Apply new settings.
  node_access_acquire_grants($node);
  cache_clear_all();
  drupal_set_message(t('Your changes to the ACL has been saved.'));
}