Ticket #156 (closed enhancement: fixed)
Update adminhandler and admin/groups for ACL
| Reported by: | michaeltwofish | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.4 |
| Component: | -none- | Version: | SVN |
| Keywords: | ACL UserGroup groups permissions has_patch | Cc: |
Description
Attached is a patch for adminhandler and admin/groups that provides a UI for granting and denying permissions for groups. It works with the UserGroup class as provided in #152, in that it will grant and deny permissions.
However, there is a problem when constructing groups that have permissions assigned to them. A backtrace shows the error below.
#0 in system/classes/error.php:84:
Error::print_backtrace()
#1 in system/classes/usergroup.php:67:
Error::error_handler(
8, 'Indirect modification of overloaded property UserGroup::$db_permissions_denied has no effect', '/Applications/MAMP/htdocs/habari/system/classes/usergroup.php', 67, array (
'paramarray' => array ( ), 'result' => array ( ), 'results' => array (
0 => '1',
), 'denied' => '1', 'id' => 0,
)
)
#2 in [core]:0:
UserGroup->construct()
#3 in system/classes/databaseconnection.php:467:
PDOStatement->fetch()
#4 in system/classes/db.php:259:
DatabaseConnection->get_row(
'SELECT * FROM {groups} WHERE name=?', array (
0 => 'tester',
), 'UserGroup'
)
#5 in system/classes/usergroup.php:436:
DB::get_row(
'SELECT * FROM {groups} WHERE name=?', array (
0 => 'tester',
), 'UserGroup'
)
#6 in system/classes/usergroup.php:409:
UserGroup::get_by_name(
'tester'
)
#7 in system/classes/adminhandler.php:1030:
UserGroup::get(
'tester'
)
#8 in system/classes/adminhandler.php:47:
AdminHandler->post_groups()
#9 in system/classes/actionhandler.php:33:
AdminHandler->act_admin()
#10 in system/classes/controller.php:180:
ActionHandler->act(
'admin'
)
#11 in index.php:186:
Controller::dispatch_request()
Error: Indirect modification of overloaded property UserGroup::$db_permissions_denied has no effect
#0 in system/classes/error.php:84:
Error::print_backtrace()
#1 in system/classes/error.php:44:
Error::error_handler(
8, 'Undefined index: file', '/Applications/MAMP/htdocs/habari/system/classes/error.php', 44, array (
'exception' => Error::set_state(array(
'message' => 'Indirect modification of overloaded property UserGroup::$db_permissions_denied has no effect', 'string' => , 'code' => 0, 'file' => '/Applications/MAMP/htdocs/habari/system/classes/error.php', 'line' => 85, 'trace' =>
array (
0 => array (
'file' => '/Applications/MAMP/htdocs/habari/system/classes/usergroup.php', 'line' => 67, 'function' => 'error_handler', 'class' => 'Error', 'type' => '::', 'args' => array (
0 => 8, 1 => 'Indirect modification of overloaded property UserGroup::$db_permissions_denied has no effect', 2 => '/Applications/MAMP/htd...)
#2 in [core]:0:
Error::exception_handler()
