Needs review
Project:
Aegir Package Use
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2012 at 20:12 UTC
Updated:
15 May 2012 at 14:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anarcat commentedThis is controlled by the node_access system, normally, so any query that will have a db_alter() thing should "just work".
Try creating a second client and adding different users to each to test this.
Comment #2
Anonymous (not verified) commentedI don't think we have node_access per platform though.
We have a function _hosting_get_allowed_platforms($user->uid); which you might be able to use to return an array of allowed platforms. Then filter your db query so it only displays the platforms as defined by this function?
Maybe?
Comment #3
helmo commentedI tested this with a dummy client who only has access to one site. This was broken.
After cleaning up the SQL squery this was solved. I suspect that the capitalization of WHERE was the problem.
And even without extra filtering only the right site was displayed.
It seems that expect db_rewrite_sql() handles this correctly.
clemens.tolboom suggested that it might be needed to call db_rewrite_sql a second time with 'n2' as basetable. I'm unsure however.