[ZBX-10755] Item deletion should not check permissions for Y max/min axis Created: 2016 May 05  Updated: 2017 May 30  Resolved: 2016 May 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.2.12, 3.0.2
Fix Version/s: 2.2.13rc1, 3.0.3rc1, 3.2.0alpha1

Type: Incident report Priority: Blocker
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: permissions
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ZBX-10755.patch    
Issue Links:
Duplicate

 Description   

Actually checkUseInGraphAxis function checks permissions for graphs in Y max/min axises. But then it disallow removal according result of check, it could be failed if some graph is not available for a user.



 Comments   
Comment by Alexander Vladishev [ 2016 May 09 ]

SQL errors when delete such items.

pg_query(): Query failed: ERROR:  update or delete on table "items" violates foreign key constraint "c_graphs_2" on table "graphs"
DETAIL:  Key (itemid)=(23732) is still referenced from table "graphs". [items.php:757 → CAPIObject->delete() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CItem->delete() → DB::delete() → DBexecute() → pg_query() in include/db.inc.php:509]
Error in query [DELETE FROM items WHERE itemid='23732'] [ERROR:  update or delete on table "items" violates foreign key constraint "c_graphs_2" on table "graphs"
DETAIL:  Key (itemid)=(23732) is still referenced from table "graphs".]
SQL statement execution has failed "DELETE FROM items WHERE itemid='23732'"
Comment by Alexander Vladishev [ 2016 May 09 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10755

Comment by Ivo Kurzemnieks [ 2016 May 10 ]

(1) No translation string changes.

sasha CLOSED

Comment by Ivo Kurzemnieks [ 2016 May 10 ]

TESTED

Comment by Alexander Vladishev [ 2016 May 11 ]

Fixed in:

  • pre-2.2.13 r60023
  • pre-3.0.3 r60029
  • pre-3.1.0 (trunk) r60031
Comment by Alexander Vladishev [ 2016 May 11 ]

(2) Documentation:

sasha RESOLVED

iivs CLOSED

Generated at Thu Mar 28 12:28:42 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.