Closed (fixed)
Project:
Hosting
Version:
6.x-0.4-alpha3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2010 at 21:03 UTC
Updated:
7 Jul 2010 at 23:00 UTC
This is actually in alpha6.
In hosting_client.module:
function hosting_client_menu_access($perm, $node) {
if ($node->type == 'client') {
return user_access($perm, $node);
} else {
return false;
}
}
Should just be return user_access($perm); I think. Otherwise should do a user_load($node->uid) and pass the resulting user object into user access not the node.
Right now this is triggering a bunch of errors for me on the client pages if the UID of the client isn't 1.
* warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/aegir/hostmaster-0.4-alpha6/includes/database.inc on line 253.
* warning: implode() [function.implode]: Bad arguments. in /home/aegir/hostmaster-0.4-alpha6/includes/database.inc on line 253.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /home/aegir/hostmaster-0.4-alpha6/modules/user/user.module on line 502.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/aegir/hostmaster-0.4-alpha6/modules/user/user.module on line 502.
Comments
Comment #1
hadsie commentedI think this should be in the hosting queue not hostmaster...
Comment #2
adrian commentedI commited this.
thanks