Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #7241 Error on fetching rights for a specific user that only has inherited rights
Submitted: 2006-03-29 09:49 UTC
From: michiel at dinnersite dot nl Assigned: lsmith
Status: Closed Package: LiveUser_Admin (version CVS)
PHP Version: 4.4.0 OS: Mandrake
Roadmaps: (Not assigned)    
Subscription  


 [2006-03-29 09:49 UTC] michiel at dinnersite dot nl (Michiel Nugter)
Description: ------------ A call to the getRights function with the initial params: Array ( [filters] => Array ( [perm_user_id] => 8 ) [inherited] => 1 [implied] => 1 [rekey] => 1 [fields] => Array ( [0] => right_id [1] => area_id [2] => right_define_name [3] => has_implied ) [select] => all ) And the params created by _getInheritedRights() Array ( [filters] => Array ( [perm_user_id] => 8 [group_id] => Array ( [0] => 1 [1] => 4 ) ) [rekey] => 1 [fields] => Array ( [0] => right_id [1] => area_id [2] => right_define_name [3] => has_implied ) [select] => all [by_group] => 1 [inherited] => [implied] => ) Results in the following errorstack (just a small part, mail me for the full errorstack): Array ( [0] => Array ( [code] => -4 [params] => Array ( [reason] => DB Error: unknown error-SELECT liveuser_rights.right_id AS right_id, liveuser_rights.area_id AS area_id, liveuser_rights.right_define_name AS right_define_name, liveuser_rights.has_implied AS has_implied FROM liveuser_rights, liveuser_groupusers WHERE liveuser_groupusers.group_id IN ('1', '3', '4') AND liveuser_rights.area_id = liveuser_areas.area_id AND liveuser_areas.application_id = liveuser_applications.application_id AND liveuser_applications.application_id = liveuser_areas.application_id AND liveuser_translations.section_type = 1 AND liveuser_areas.area_id = liveuser_translations.section_id AND liveuser_translations.section_id = liveuser_applications.application_id AND liveuser_rights.right_id = liveuser_translations.section_id [nativecode=1109 ** Unknown table 'liveuser_areas' in where clause] ) [package] => LiveUser_Admin [level] => exception [time] => 1143622685.44 [context] => Array ( [file] => /home/netural/ds6/sdk/PEAR/LiveUser/Admin/Storage/DB.php [line] => 321 [function] => queryall [class] => liveuser_admin_perm_storage_db ) [message] => Couldn't create the query, reason: DB Error: unknown error-SELECT liveuser_rights.right_id AS right_id, liveuser_rights.area_id AS area_id, liveuser_rights.right_define_name AS right_define_name, liveuser_rights.has_implied AS has_implied FROM liveuser_rights, liveuser_groupusers WHERE liveuser_groupusers.group_id IN ('1', '3', '4') AND liveuser_rights.area_id = liveuser_areas.area_id AND liveuser_areas.application_id = liveuser_applications.application_id AND liveuser_applications.application_id = liveuser_areas.application_id AND liveuser_translations.section_type = 1 AND liveuser_areas.area_id = liveuser_translations.section_id AND liveuser_translations.section_id = liveuser_applications.application_id AND liveuser_rights.right_id = liveuser_translations.section_id [nativecode=1109 ** Unknown table 'liveuser_areas' in where clause] ) [1] => Array ( [code] => -4 [params] => Array ( [reason] => infinite recursion detected: translations ) [package] => LiveUser_Admin [level] => exception [time] => 1143622685.44 [context] => Array ( [file] => /home/netural/ds6/sdk/PEAR/LiveUser/Admin/Storage/SQL.php [line] => 717 [function] => createjoinfilter [class] => liveuser_admin_perm_storage_db ) [message] => Couldn't create the query, reason: infinite recursion detected: translations )

Comments

 [2006-03-29 20:49 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-03-30 07:49 UTC] michiel at dinnersite dot nl
A tricky one indeed.. Btw. I did try to remove the perm_user_id from the getInheritedRights params but nothing changed. I could help out on some points to add some comment to the Admin side of LiveUser... (Been working with it a lot so I think understanding the code quite well). Mail me if you need any help with this..
 [2006-03-30 07:52 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-03-30 08:11 UTC] michiel at dinnersite dot nl
Sounds
 [2006-03-30 08:11 UTC] michiel at dinnersite dot nl
Sounds like a BC break, don't know if my code would break because of it (don't think so) but I can image it will with some others..
 [2006-03-30 08:13 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-04-09 15:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-04-10 09:07 UTC] michiel at dinnersite dot nl
It still generates errors unfortunately. Using the following params: Array ( [filters] => Array ( [perm_user_id] => 9 ) [inherited] => Array ( [perm_user_id] => 9 ) [implied] => Array ( [perm_user_id] => 9 ) [rekey] => 1 [fields] => Array ( [0] => right_id [1] => area_id [2] => right_define_name [3] => has_implied ) [select] => all ) The errorstack: [0] => Array ( [code] => -4 [params] => Array ( [reason] => DB Error: no such field-SELECT liveuser_rights.right_id AS right_id, liveuser_rights.area_id AS area_id, liveuser_rights.right_define_name AS right_define_name, liveuser_rights.has_implied AS has_implied FROM liveuser_rights, liveuser_groupusers WHERE liveuser_groupusers.perm_user_id = '9' AND liveuser_groupusers.group_id IN ('1') AND liveuser_rights.area_id = liveuser_areas.area_id AND liveuser_areas.application_id = liveuser_applications.application_id AND liveuser_applications.application_id = liveuser_areas.application_id AND liveuser_translations.section_type = 1 AND liveuser_areas.area_id = liveuser_translations.section_id AND liveuser_translations.section_id = liveuser_applications.application_id AND liveuser_rights.right_id = liveuser_translations.section_id [nativecode=1054 ** Unknown column 'liveuser_areas.area_id' in 'where clause'] ) [package] => LiveUser_Admin [level] => exception [time] => 1144659042.51 [context] => Array ( [file] => /home/netural/ds6/sdk/PEAR/LiveUser/Admin/Storage/DB.php [line] => 321 [function] => queryall [class] => liveuser_admin_perm_storage_db ) [message] => Couldn't create the query, reason: DB Error: no such field-SELECT liveuser_rights.right_id AS right_id, liveuser_rights.area_id AS area_id, liveuser_rights.right_define_name AS right_define_name, liveuser_rights.has_implied AS has_implied FROM liveuser_rights, liveuser_groupusers WHERE liveuser_groupusers.perm_user_id = '9' AND liveuser_groupusers.group_id IN ('1') AND liveuser_rights.area_id = liveuser_areas.area_id AND liveuser_areas.application_id = liveuser_applications.application_id AND liveuser_applications.application_id = liveuser_areas.application_id AND liveuser_translations.section_type = 1 AND liveuser_areas.area_id = liveuser_translations.section_id AND liveuser_translations.section_id = liveuser_applications.application_id AND liveuser_rights.right_id = liveuser_translations.section_id [nativecode=1054 ** Unknown column 'liveuser_areas.area_id' in 'where clause'] ) [1] => Array ( [code] => -4 [params] => Array ( [reason] => infinite recursion detected: translations ) [package] => LiveUser_Admin [level] => exception [time] => 1144659042.51 [context] => Array ( [file] => /home/netural/ds6/sdk/PEAR/LiveUser/Admin/Storage/SQL.php [line] => 717 [function] => createjoinfilter [class] => liveuser_admin_perm_storage_db ) [message] => Couldn't create the query, reason: infinite recursion detected: translations ) Other changes with this version: * Break in my getGroups function, had to change my call to getRights(). * Rights still fetch ok for the current logged in user (inherited and granted) with current code (no changes).
 [2006-04-10 10:34 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-04-12 11:37 UTC] michiel at dinnersite dot nl
An update on the situation. I got everything working again, but with some interesting notes. In some cases adding right_level is required and some times adding right_level causes problems. right_level is required when you add perm_user_id or group_id to the filters. right_level gives problems when filtering on area_id. I included my parameters below, maby they can help some. With these parameters the right_level is required: Array ( [filters] => Array ( [perm_user_id] => 8 ) [inherited] => Array ( [perm_user_id] => 8 ) [implied] => Array ( [perm_user_id] => 8 ) [rekey] => 1 [fields] => Array ( [0] => right_id [1] => area_id [2] => right_define_name [3] => has_implied [4] => right_level ) [select] => all ) The same goes for filtering by group_id. However if you add right_level when filtering on area_id results in an empty array. Removing the right_level does provide (the correct) results.
 [2006-04-13 08:59 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-04-13 10:59 UTC] michiel at dinnersite dot nl
I mailed you my database dump.
 [2006-04-13 11:01 UTC] michiel at dinnersite dot nl
I maile
 [2006-04-14 13:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-04-14 14:42 UTC] michiel at dinnersite dot nl
Hmm, that is a bit weird. I'll just try to renew my whole LiveUser package with the CVS version again (did the admin part once already). I'll update you as soon as I know more.
 [2006-04-19 08:22 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!