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.
./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;
}
?>