-
Incident report
-
Resolution: Incomplete
-
Minor
-
None
-
1.8.4
-
None
I try to link hostid 10244 to templates :
{ 'params': {'templates': ['10059', '10228', '11176'],
'hosts': [
]},
'jsonrpc': '2.0',
'method': 'host.massUpdate',
'auth': '162a55f1cdde6eaaa2aeed147f5a1332',
'id': 6}
response:
{'jsonrpc': '2.0', 'id': 6, 'error': {'message': 'Application error.', 'code': -32500, 'data': '[ CTemplate::massAdd ] You do not have permission to perform this operation'}}
the fix:
api/classes/class.ctemplate.php:1152
foreach($templates as $tnum => $template){
- if(!isset($upd_templates[$template['templateid']]))
Unknown macro: {+ if(!isset($upd_templates[$template])){ self::exception(ZBX_API_ERROR_PERMISSIONS, S_NO_PERMISSION); } }