Support from Acquia helps fund testing for Drupal Acquia logo

Comments

baisong’s picture

Patch attached

baisong’s picture

Version: 7.x-2.x-dev » 7.x-2.0
FileSize
9.3 KB

Same patch against 7.x-2.0

pgillis’s picture

Have you tried version 7.x-2.1 yet? There were some changes there to address performance issues with hook_node_grants.

That said, without the hook_node_grants implementation admins will not be able to grant view permission to group members to view unpublished content.

pgillis’s picture

Assigned: Unassigned » pgillis
pgillis’s picture

Status: Active » Closed (won't fix)
rbrandon’s picture

Corrected patch against 7.x-2.0

rbrandon’s picture

Looks like this was never tested, replaced node_grants with node_access to achieve what oren was doing.

rbrandon’s picture

Doh, same as above without fat fingers.

pgillis’s picture

Believe me, I share your concern about the performance of this function but I don't know any way around it. Perhaps there is something we can do with this function to make it perform better. The reason we need to keep it is because of node listings. There is more information at Node Access Rights.

In my deployment I depend on view listings and need the permissions working there.

The reason I asked if you tried against 7.x-2.1 in comment #3 is because there was a substantial improvement in the performance of this function in that release. You can see I was walking down essentially the same path as you a few months ago, Node access too slow when current user is member of large number of groups.

shenzhuxi’s picture

Issue summary: View changes

@baisong @rbrandon Did pgillis's patch solve the performance problem? I find Open Scholar is still using

projects[og_moderation][subdir] = "contrib"
projects[og_moderation][version] = 2.0
projects[og_moderation][patch][] = "http://drupal.org/files/og_moderation-remove_node_grants-2091179-7.patch"

https://github.com/openscholar/openscholar/blob/SCHOLAR-3.x/openscholar/...