domain_form_perm

Versions
domain
domain_form_perm()

Check a user's permissions for displaying the Domain form on nodes.

This sets the hierarchy of user form permissions for those without 'set domain access'. Note that the most permissive permission wins.

Code

./domain.module, line 1763

<?php
function domain_form_perm() {
  $perms = array(
    'publish from default domain' => 1,
    'publish from assigned domain' => 2,
    'publish to any assigned domain' => 3,
  );
  // By default, we will hide the form by returning NULL.
  $action = NULL;
  foreach ($perms as $perm => $value) {
    if (user_access($perm)) {
      $action = $value;
    }
  }
  return $action;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List