Loading...
 
Skip to main content

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
(0)
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 code
Copy to clipboard
if (!(($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 is

proposed correction
Copy to clipboard
if (!(($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+
Demonstrate Bug (older Tiki versions)
Ticket ID
3107
Created
Saturday 10 April, 2010 18:33:38 UTC
by Gergely
LastModif
Sunday 30 January, 2011 15:04:46 UTC


Show PHP error messages