Skip to content
Permalink
Browse files
Merge pull request #758 from tarasfrompir/patch-1
Добавлено розграничение прав доступа к терминалам
  • Loading branch information
sergejey committed Jun 5, 2020
2 parents 97f413d + 775805b commit 0ea6c6e46123be09c195511fb1d9e11a2a480912
Showing 3 changed files with 21 additions and 7 deletions.
@@ -363,7 +363,13 @@ function usual(&$out) {
if($out['TERMINALS_TOTAL'] == 1 || !count($session_terminals)) {
$terminals[0]['SELECTED'] = 1;
}
$out['TERMINALS'] = $terminals;
foreach ($terminals as $temp_terminal) {
if (!checkAccess('terminal', $temp_terminal['ID'])) {
continue;// some action for every record if required
}
$out['TERMINALS'][] = $temp_terminal;
}
//$out['TERMINALS'] = $terminals;

// Unique ID
$out['APP_PLAYER_ID'] = uniqid('app_player_');
@@ -44,13 +44,12 @@
paging($res, 50, $out); // search result paging
colorizeArray($res);
$total = count($res);
/*
for($i=0;$i<$total;$i++) {
// some action for every record if required
if (!checkAccess('terminal', $res[$i]['ID'])) {
continue;// some action for every record if required
}
$out['RESULT'][] = $res[$i];
}
*/
$out['RESULT'] = $res;

}

?>
@@ -257,7 +257,16 @@
</div>

</div>

<!-- разграничение прав доступа к терминалам -->
[#if ID!=""#]
<div class="form-group ">
<label class="col-lg-4 control-label" for="inputTitle"><#LANG_ACCESS_CONTROL#>:<#LANG_HCB#>access_control<#LANG_HCE#></label>
<div class="col-lg-5">
<a class="btn btn-default " href="?(panel:{action=security_rules})&object_type=terminal&object_id=[#ID#]&print=1" onClick="return openModalTWindow('security', '<#LANG_ACCESS_CONTROL#>', this.href, 800, 600);" target=_blank><#LANG_SET#></a>
</div>
</div>
[#endif ID#]
<!-- разграничение прав доступа к терминалам -->
<div class="form-group">
<div class="col-lg-offset-2 col-lg-5">
[#if ID!=""#]

0 comments on commit 0ea6c6e

Please sign in to comment.