-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Flag Friend as of https://www.drupal.org/node/1971136 provides access control exclusively via hook_node_grants() and hook_node_access_records() instead of by hook_node_access(). While hook_node_access() is much easier to write, it would require additional caching on our end. We need to investigate if the grant system could be used instead so as to reduce complexity in the module.
The biggest challenge will be figuring out how to transform each circle into a security realm. This will need to be done dynamically in hook_node_grants() by specifying a new security realm for each circle the node is posted to prefixed by the author ID. Circle names only are unique to each user, not across users. Then, in hook_node_access_records(), the $account must be added to each circle to which the user has been added.