Skip to content

Commit

Permalink
webform node default to Authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
protitude committed Jan 3, 2024
1 parent 4e519f0 commit 0e5ebec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions oit.module
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ function oit_webform_access_rules_alter(array &$access_rules) {
}
}

/**
* Implements oit_webform_access_rules_alter().
*/
function oit_entity_create(EntityInterface $entity) {
if ($entity->getEntityType()->getBundleEntityType() == 'node_type' && $entity->getType() == 'webform') {
// Set access control set to Authenticated.
$entity->set('field_access_control_2', '475');
}
}

/**
*
*/
Expand Down

0 comments on commit 0e5ebec

Please sign in to comment.