When assigning group permissions, it would help simplify the UI if there was a way to hide the "Owner permissions" option so people had only a choice of picking one of the created groups or leaving it public.

Comments

kumkum29’s picture

Hello,

i want hide "Owner permissions" option. Have you found a solution ?

Thanks.

kumkum29’s picture

Hello,

i have create a function to hide this element in the admin theme (seven). See the post :
https://drupal.org/node/2016451

But, I could not create a module with this function.

Do you have any idea?

Thanks.

StryKaizer’s picture

Issue summary: View changes

You need to change your module weight. Simple access has a module weight of 9, so your module needs to trigger after simple access added the form.

You can do this by creating following files (replace yourmodule by your custom module name)

yourmodule.install

/**
 * Change module weight to trigger later
 */
function yourmodule_update_7000(&$sandbox) {

  db_query("UPDATE {system} SET weight = 15 WHERE type = 'module' AND name = 'yourmodule'");
  return;
}

yourmodule.module

function yourmodule_form_alter(&$form, &$form_data, $form_id) {

  if(isset($form['simple_access']['simple_access']['owner']['#access'])){
    $form['simple_access']['simple_access']['owner']['#access'] = FALSE;
  }

Then run update.php, and owner will be hidden for all node types