You are here

function simple_access_owner_revoke_form in Simple Access 8.3

Same name and namespace in other branches
  1. 6.2 simple_access.module \simple_access_owner_revoke_form()
  2. 7.2 simple_access.module \simple_access_owner_revoke_form()

Configure revoke content owner permissions.

File

./simple_access.module, line 581
Builds simple access definition for content access.

Code

function simple_access_owner_revoke_form($settings = []) {
  $form = [];
  $form['sa_owner_permissions'] = [
    '#type' => 'checkboxes',
    '#title' => t('Revoke owner permissions'),
    '#default_value' => empty($settings['sa_owner_permissions']) ? [] : $settings['sa_owner_permissions'],
    '#options' => [
      'sa_view' => t('View'),
      'sa_update' => t('Update'),
      'sa_delete' => t('Delete'),
    ],
    '#description' => t('Select permissions to revoke for the content owner'),
  ];
  return $form;
}