-
Notifications
You must be signed in to change notification settings - Fork 240
Conversation
An user can have a role to access to configuration API or realtime API.
* Add the parameter reach_api_rt on contact and contact template
Use the database flag instead the is_admin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think default admin user on fresh install does not have access to realtime api
* @param string $action The action name | ||
* @param array $user The current user | ||
* @param boolean $isInternal If the api is call in internal | ||
* @return boolean If the has access to the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation : "boolean If the ? has..."
* @param string $action The action name | ||
* @param array $user The current user | ||
* @param boolean $isInternal If the api is call in internal | ||
* @return boolean If the has access to the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation : "boolean If the ? has..."
* @param string $action The action name | ||
* @param array $user The current user | ||
* @param boolean $isInternal If the api is call in internal | ||
* @return boolean If the has access to the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation : "boolean If the ? has..."
* @param string $action The action name | ||
* @param array $user The current user | ||
* @param boolean $isInternal If the api is call in internal | ||
* @return boolean If the has access to the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation : "boolean If the ? has..."
* @param string $action The action name | ||
* @param array $user The current user | ||
* @param boolean $isInternal If the api is call in internal | ||
* @return boolean If the has access to the action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation : "boolean If the ? has..."
@@ -531,6 +532,8 @@ function updateContact($contact_id = null, $from_MC = false) | |||
isset($ret["contact_oreon"]["contact_oreon"]) && $ret["contact_oreon"]["contact_oreon"] != null ? $rq .= "'" . $ret["contact_oreon"]["contact_oreon"] . "', " : $rq .= "NULL, "; | |||
$rq .= "reach_api = "; | |||
isset($ret["reach_api"]["reach_api"]) && $ret["reach_api"]["reach_api"] != null ? $rq .= "'" . $ret["reach_api"]["reach_api"] . "', " : $rq .= "NULL, "; | |||
$rq .= "reach_api_rt = "; | |||
isset($ret["reach_api_rt"]["reach_api_rt"]) && $ret["reach_api_rt"]["reach_api_rt"] != null ? $rq .= "'" . $ret["reach_api_rt"]["reach_api_rt"] . "', " : $rq .= "NULL, "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding Style : lenght >120chars
@@ -439,6 +439,7 @@ function insertContact($ret = array()) | |||
isset($ret["contact_oreon"]["contact_oreon"]) && $ret["contact_oreon"]["contact_oreon"] != null ? $rq .= "'" . $ret["contact_oreon"]["contact_oreon"] . "', " : $rq .= " '1', "; | |||
} | |||
isset($ret["reach_api"]["reach_api"]) && $ret["reach_api"]["reach_api"] != null ? $rq .= $ret["reach_api"]["reach_api"] . ", " : $rq .= " 0, "; | |||
isset($ret["reach_api_rt"]["reach_api_rt"]) && $ret["reach_api_rt"]["reach_api_rt"] != null ? $rq .= $ret["reach_api_rt"]["reach_api_rt"] . ", " : $rq .= " 0, "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding Style : lenght >120chars
@@ -395,7 +395,7 @@ function insertContact($ret = array()) | |||
"`contact_id` , `timeperiod_tp_id` , `timeperiod_tp_id2` , `contact_name` , " . | |||
"`contact_alias` , `contact_autologin_key` , `contact_passwd` , `contact_lang` , `contact_template_id`, " . | |||
"`contact_host_notification_options` , `contact_service_notification_options` , " . | |||
"`contact_email` , `contact_pager` , `contact_comment` , `contact_oreon`, `reach_api`, `contact_register`, `contact_enable_notifications` , " . | |||
"`contact_email` , `contact_pager` , `contact_comment` , `contact_oreon`, `reach_api`, `reach_api_rt`, `contact_register`, `contact_enable_notifications` , " . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding Style : lenght >120chars
@@ -118,14 +118,15 @@ | |||
{if $displayAdminFlag == 1} | |||
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="admin"> {$form.contact_admin.label}</td><td class="FormRowValue">{$form.contact_admin.html}</td></tr> | |||
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="reach_api"> {$form.reach_api.label}</td><td class="FormRowValue">{$form.reach_api.html}</td></tr> | |||
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="reach_api_rt"> {$form.reach_api_rt.label}</td><td class="FormRowValue">{$form.reach_api_rt.html}</td></tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding Style : lenght > 120chars
{/if} | ||
<tr class="list_lvl_1"> | ||
<td class="ListColLvl1_name" colspan="2"> | ||
<h4>{$form.header.acl}</h4> | ||
</td> | ||
</tr> | ||
{if $o == "mc"} | ||
<tr class="list_two"><td class="FormRowField"><img class="helpTooltip" name="mc_update"> {$form.mc_mod_acl.label}</td><td class="FormRowValue">{$form.mc_mod_acl.html}</td></tr> | ||
<tr class="list_one"><td class="FormRowField"><img class="helpTooltip" name="mc_update"> {$form.mc_mod_acl.label}</td><td class="FormRowValue">{$form.mc_mod_acl.html}</td></tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coding Style : lenght > 120chars
* Fix bad comment * Split line to be less of 120 characters
Separate Rest Api configuration and Rest Api realtime access.
Add the choise to access on each API on the user configuration page.