Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi. In D6 version, one could grant permissions in code by doing something like this:
$settings = array('ops' => array('view', 'update'));
$account = user_load($user->uid);
content_access_action_acl_grant_access($node, $account, $settings);
This was used for granting access to a node based on various criteria e.g. user, role, etc.
Please what is the D7 equivalent for doing something similar? I could not find relevant documentation. Thanks.
Comments
Comment #2
gisleThis issue has not received any updates in the previous 3 years. If you believe it to still be relevant, you are encouraged to reopen the issue and update it.
If you got an email about this Issue status update, it is because you at one time (possibly a very long time ago), subscribed to it. To learn how to unsubscribe yourself, please visit: https://www.drupal.org/project/webmasters/issues/3142987