Cannot update tracker item even if proper rights are granted
- Status
- Closed
- Subject
- Cannot update tracker item even if proper rights are granted
- Version
- 4.x
5.x - Category
- Error
- Usability
- Patch
- Feature
- Trackers
- Submitted by
- Gergely
- Lastmod by
- Gergely
- Rating
- Description
We have a registered user X with right tiki_p_modify_tracker_items.
X tries to update a field using the tracker wiki plugin, and fails.
"You do not have permission to modify an item"
Please review my correction proposal. I am rather new with both php and TW.- Solution
My guess is that the following part of the wikiplugin_tracker.php shall be replaced.
TW5.0beta1 codeCopy to clipboardif (!(($perms['tiki_p_modify_tracker_items'] == 'y' and $item_info['status'] != 'p' and $item_info['status'] != 'c') || ($perms['tiki_p_modify_tracker_items_pending'] == 'y' and $item_info['status'] == 'p') || ($perms['tiki_p_modify_tracker_items_closed'] == 'y' and $item_info['status'] == 'c'))) { if ($tracker['writerGroupCanModify'] == 'y' && in_array($trklib->get_item_group_creator($trackerId, $itemId), $tikilib->get_user_groups($user))) { global $group; $smarty->assign_by_ref('ours', $group); } else return '<b>'.tra("You do not have permission to modify an item").'</b>'; }
My suggested replacement isproposed correctionCopy to clipboardif (!(($perms['tiki_p_modify_tracker_items'] == 'y' and $item_info['status'] != 'p' and $item_info['status'] != 'c') || ($perms['tiki_p_modify_tracker_items_pending'] == 'y' and $item_info['status'] == 'p') || ($perms['tiki_p_modify_tracker_items_closed'] == 'y' and $item_info['status'] == 'c') || ($tracker['writerGroupCanModify'] == 'y' && in_array($trklib->get_item_group_creator($trackerId, $itemId), $tikilib->get_user_groups($user))) )) { return '<b>'.tra("You do not have permission to modify an item").'</b>'; } //else { // global $group; // $smarty->assign_by_ref('ours', $group); //}
could not reproduce this in 6.1, closing- Importance
- 8
- Priority
- 40
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 3107
- Created
- Saturday 10 April, 2010 18:33:38 UTC
by Gergely - LastModif
- Sunday 30 January, 2011 15:04:46 UTC