mirror of
https://github.com/itflow-org/itflow
synced 2026-03-10 07:44:50 +00:00
Merge pull request #505 from wrongecho/quick-fix-tech-financials
Role enforcement
This commit is contained in:
@@ -320,7 +320,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- Show actions for Admin role only -->
|
<!-- Show actions for Admin role only -->
|
||||||
<?php //if($session_user_role == 3) { ?>
|
<?php if ($session_user_role == 3) { ?>
|
||||||
<td>
|
<td>
|
||||||
<div class="dropdown dropleft text-center">
|
<div class="dropdown dropleft text-center">
|
||||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||||
@@ -335,7 +335,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<?php //} ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@@ -1,6 +1,17 @@
|
|||||||
<?php include("inc_all.php"); ?>
|
<?php include("inc_all.php"); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Quick fix to prevent non-admins (i.e. techs) seeing financials - redirect to client list
|
||||||
|
// To be removed when we have a proper technical dashboard for techs
|
||||||
|
if ($_SESSION['user_role'] != 3) { ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.location.href = 'clients.php';
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function roundUpToNearestMultiple($n, $increment = 1000)
|
function roundUpToNearestMultiple($n, $increment = 1000)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user