mirror of https://github.com/itflow-org/itflow
Move reports perms to new role system
This commit is contained in:
parent
abd985d0f4
commit
6df3a35766
|
|
@ -4,7 +4,7 @@ This file documents all notable changes made to ITFlow.
|
|||
|
||||
## [25.02]
|
||||
### Fixed
|
||||
- Fix report permissions for un-billed tickets
|
||||
- Changed several reports over to the new permissions/roles system
|
||||
- Fixed empty task box showing for resolved/closed tickets
|
||||
|
||||
### Added / Changed
|
||||
|
|
|
|||
|
|
@ -15,81 +15,74 @@
|
|||
|
||||
<ul class="nav nav-pills nav-sidebar flex-column mt-2" data-widget="treeview" data-accordion="false">
|
||||
|
||||
<?php if ($config_module_enable_accounting == 1) { ?>
|
||||
<li class="nav-header">FINANCIAL</li>
|
||||
<li class="nav-header">FINANCIAL</li>
|
||||
<?php if ($config_module_enable_accounting == 1 && lookupUserPermission("module_financial") >= 1) { ?>
|
||||
<li class="nav-item">
|
||||
<a href="report_income_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_income_summary.php") { echo "active"; } ?>">
|
||||
<i class="far fa-circle nav-icon"></i>
|
||||
<p>Income</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_income_by_client.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_income_by_client.php") { echo "active"; } ?>">
|
||||
<i class="far fa-user nav-icon"></i>
|
||||
<p>Income By Client</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_recurring_by_client.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_recurring_by_client.php") { echo "active"; } ?>">
|
||||
<i class="fa fa-sync nav-icon"></i>
|
||||
<p>Recurring Income By Client</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_clients_with_balance.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_clients_with_balance.php") { echo "active"; } ?>">
|
||||
<i class="fa fa-exclamation-triangle nav-icon"></i>
|
||||
<p>Clients with a Balance</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_expense_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_expense_summary.php") { echo "active"; } ?>">
|
||||
<i class="far fa-credit-card nav-icon"></i>
|
||||
<p>Expense</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_expense_by_vendor.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_expense_by_vendor.php") { echo "active"; } ?>">
|
||||
<i class="far fa-building nav-icon"></i>
|
||||
<p>Expense By Vendor</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_budget.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_budget.php") { echo "active"; } ?>">
|
||||
<i class="fas fa-list nav-icon"></i>
|
||||
<p>Budget</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_tax_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_tax_summary.php") { echo "active"; } ?>">
|
||||
<i class="fas fa-percent nav-icon"></i>
|
||||
<p>Tax Summary</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_profit_loss.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_profit_loss.php") { echo "active"; } ?>">
|
||||
<i class="fas fa-file-invoice-dollar nav-icon"></i>
|
||||
<p>Profit & Loss</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_tickets_unbilled.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_tickets_unbilled.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-life-ring"></i>
|
||||
<p>Unbilled Tickets</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php if (lookupUserPermission("module_financial") >= 1) { ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="report_income_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_income_summary.php") { echo "active"; } ?>">
|
||||
<i class="far fa-circle nav-icon"></i>
|
||||
<p>Income</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_income_by_client.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_income_by_client.php") { echo "active"; } ?>">
|
||||
<i class="far fa-user nav-icon"></i>
|
||||
<p>Income By Client</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_recurring_by_client.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_recurring_by_client.php") { echo "active"; } ?>">
|
||||
<i class="fa fa-sync nav-icon"></i>
|
||||
<p>Recurring Income By Client</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_clients_with_balance.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_clients_with_balance.php") { echo "active"; } ?>">
|
||||
<i class="fa fa-exclamation-triangle nav-icon"></i>
|
||||
<p>Clients with a Balance</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_expense_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_expense_summary.php") { echo "active"; } ?>">
|
||||
<i class="far fa-credit-card nav-icon"></i>
|
||||
<p>Expense</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_expense_by_vendor.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_expense_by_vendor.php") { echo "active"; } ?>">
|
||||
<i class="far fa-building nav-icon"></i>
|
||||
<p>Expense By Vendor</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_budget.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_budget.php") { echo "active"; } ?>">
|
||||
<i class="fas fa-list nav-icon"></i>
|
||||
<p>Budget</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_tax_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_tax_summary.php") { echo "active"; } ?>">
|
||||
<i class="fas fa-percent nav-icon"></i>
|
||||
<p>Tax Summary</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_profit_loss.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_profit_loss.php") { echo "active"; } ?>">
|
||||
<i class="fas fa-file-invoice-dollar nav-icon"></i>
|
||||
<p>Profit & Loss</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if (lookupUserPermission("module_sales") >= 1) { ?>
|
||||
<li class="nav-item">
|
||||
<a href="report_tickets_unbilled.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_tickets_unbilled.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-life-ring"></i>
|
||||
<p>Unbilled Tickets</p>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } // End financial reports IF statement ?>
|
||||
|
||||
|
||||
<li class="nav-header">TECHNICAL</li>
|
||||
<?php if ($config_module_enable_ticketing) { ?>
|
||||
<?php if ($config_module_enable_ticketing && lookupUserPermission("module_support") >= 1) { ?>
|
||||
<li class="nav-item">
|
||||
<a href="report_ticket_summary.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_ticket_summary.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-life-ring"></i>
|
||||
|
|
@ -115,18 +108,20 @@
|
|||
|
||||
<li class="nav-header">OVERVIEWS</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="report_assets.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_assets.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-desktop"></i>
|
||||
<p>All Assets</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_domains.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_domains.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-globe"></i>
|
||||
<p>All Domains</p>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (lookupUserPermission("module_support") >= 1) { ?>
|
||||
<li class="nav-item">
|
||||
<a href="report_assets.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_assets.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-desktop"></i>
|
||||
<p>All Assets</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="report_domains.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "report_domains.php") { echo "active"; } ?>">
|
||||
<i class="nav-icon fas fa-globe"></i>
|
||||
<p>All Domains</p>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
$year = intval($_GET['year']);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
if ($_GET['year'] === 'all') {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
$year = intval($_GET['year']);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
if ($_GET['year'] === 'all') {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
$year = intval($_GET['year']);
|
||||
|
|
@ -147,8 +147,7 @@ $sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once "includes/footer.php";
|
||||
?>
|
||||
<?php require_once "includes/footer.php"; ?>
|
||||
|
||||
<script>
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateAccountantRole();
|
||||
enforceUserPermission('module_financial');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
$year = intval($_GET['year']);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateTechRole();
|
||||
enforceUserPermission('module_support');
|
||||
|
||||
function secondsToTime($inputSeconds) {
|
||||
$inputSeconds = floor($inputSeconds);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "includes/inc_all_reports.php";
|
||||
|
||||
validateTechRole();
|
||||
enforceUserPermission('module_support');
|
||||
|
||||
if (isset($_GET['year'])) {
|
||||
$year = intval($_GET['year']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue