Closed (fixed)
Project:
Search API Pages
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2011 at 06:14 UTC
Updated:
28 Apr 2014 at 12:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rooby commentedHere is a patch.
It uses the existing permission as the access all pages permission so there is no need for an update to migrate existing sites' permissions.
A user is granted access if they have either the 'all' permission or the individual page permission for the given page.
Comment #2
ohthehugemanatee commentedPatch applied cleanly on current stable branch... and it appears to work. Thank you!
Comment #3
damienmckennaSeems reasonable, the patch is clean. Good to go.
Comment #4
drunken monkeyThanks a lot for suggesting this, great idea! Sorry for not seeing it earlier, and thanks for pusing it, Damien!
There are only a few smaller issues with the patch, apart from that it's good to go:
Please remove the
_callbacksuffix from the function name, I don't think that's usually done.Also, like for the
page argumentsabove, please just pass the page machine name, not the whole page object.The
check_plain()is completely unnecessary here (and in the permission definition below).Thanks again!
Comment #5
damienmckennaHow about this then? I removed the check_plain and changed it to use the machine name for all internal strings rather than the index_id.
Comment #6
rooby commentedBeat me to it I was just about to post the same thing.
Thanks.
Comment #8
drunken monkeyLooks good, thanks. And thanks again to rooby, of course!
Committed.