Skip to content

Commit 885a002

Browse files
authored
Merge pull request #1281 from itflow-org/develop
Develop to Master
2 parents 5c89e50 + 67382a4 commit 885a002

208 files changed

Lines changed: 668 additions & 1031 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
This file documents all notable changes made to ITFlow.
44

5+
## [26.05] Stable Release
6+
### Bug Fixes
7+
- Stripe Payment: Fix adding saved cards on client portal.
8+
- Various client and module enforments fixes.
9+
- Projects: Fix slow load by using an optimized query to count tickets and tasks.
10+
- Show correct currency for the account balance when adding payment to invoice.
11+
- Expire all Password reset tokens nightly with cron.
12+
- Shared Items via secure link: Do not delete shared items that have not been viewed before cron runs.
13+
- Client: Fix Client Abbreviation being converted to an int on edit.
14+
15+
### New Features & Updates
16+
- Bump TinyMCE from 8.4.0 to 8.5.0.
17+
- Bump TCPDF from 6.11.2 to 6.11.3.
18+
- DeBump stripe-php from 20.0.0 to 19.4.1.
19+
520
## [26.04] Stable Release
621
### Bug Fixes
722
- Racks: Fix Device Removal.

agent/ajax.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@
403403
$totp_secret = $sql['credential_otp_secret'];
404404
$client_id = intval($sql['credential_client_id']);
405405

406+
enforceClientAccess();
407+
406408
$otp = TokenAuth6238::getTokenCode(strtoupper($totp_secret));
407409
echo json_encode($otp);
408410

agent/asset_details.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@
615615
</form>
616616
</div>
617617

618+
<?php if (lookupUserPermission('module_credential')) { // Begin Credential Enforcement ?>
619+
618620
<div class="card card-dark <?php if ($credential_count == 0) { echo "d-none"; } ?>">
619621
<div class="card-header">
620622
<h3 class="card-title"><i class="fa fa-fw fa-key mr-2"></i>Credentials</h3>
@@ -744,6 +746,8 @@
744746
</div>
745747
</div>
746748

749+
<?php } // End Credential Enforcement ?>
750+
747751
<div class="card card-dark <?php if ($software_count == 0) { echo "d-none"; } ?>">
748752
<div class="card-header py-2">
749753
<h3 class="card-title mt-2"><i class="fa fa-fw fa-cube mr-2"></i>Licenses</h3>

agent/client_overview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349

350350
<?php } ?>
351351

352-
<?php if (mysqli_num_rows($sql_favorite_credentials) > 0) { ?>
352+
<?php if ((mysqli_num_rows($sql_favorite_credentials) > 0) && (lookupUserPermission('module_credential'))) { ?>
353353

354354
<div class="col-md-4">
355355

agent/contact_details.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ class="btn btn-secondary btn-sm" title="Unlink">
507507
</div>
508508
</div>
509509

510+
<?php if (lookupUserPermission('module_credential')) { // Begin Credential Enforcement ?>
511+
510512
<div class="card card-dark <?php if ($credential_count == 0) { echo "d-none"; } ?>">
511513
<div class="card-header py-2">
512514
<h3 class="card-title mt-2"><i class="fa fa-fw fa-key mr-2"></i>Credentials</h3>
@@ -644,6 +646,8 @@ class="btn btn-secondary btn-sm" title="Unlink">
644646
</div>
645647
</div>
646648

649+
<?php } // End Credential Enforcement ?>
650+
647651
<div class="card card-dark <?php if ($software_count == 0) { echo "d-none"; } ?>">
648652
<div class="card-header py-2">
649653
<h3 class="card-title mt-2"><i class="fa fa-fw fa-cube mr-2"></i>Related Licenses</h3>

agent/modals/asset/asset_details.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ function updateAssetNotes(asset_id) {
495495
</div>
496496
<?php } ?>
497497

498-
<?php if ($credential_count) { ?>
498+
<?php if (lookupUserPermission('module_credential') && ($credential_count)) { ?>
499499
<div class="tab-pane fade" id="pills-asset-credentials">
500500
<div class="table-responsive-sm-sm">
501501
<table class="table table-sm table-striped table-borderless table-hover">

agent/modals/contact/contact_details.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@
334334
</a>
335335
<?php } ?>
336336

337-
<?php if ($credential_count) { ?>
337+
<?php
338+
if (lookupUserPermission('module_credential') && ($credential_count)) { ?>
338339
<a class="nav-link <?= ($first_tab === "credentials") ? "active" : "" ?>"
339340
data-toggle="pill"
340341
href="#pills-contact-credentials<?= $contact_id ?>"
@@ -519,7 +520,7 @@
519520
</div>
520521
<?php } ?>
521522

522-
<?php if ($credential_count) { ?>
523+
<?php if (lookupUserPermission('module_credential') && ($credential_count)) { ?>
523524
<div class="tab-pane fade <?= ($first_tab === "credentials") ? "show active" : "" ?>" id="pills-contact-credentials<?= $contact_id ?>">
524525
<div class="table-responsive-sm">
525526
<table class="table table-striped table-borderless table-hover table-sm dataTables" style="width:100%">

agent/modals/credential/credential_edit.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require_once '../../../includes/modal_header.php';
44

5+
enforceUserPermission('module_credential', 2);
6+
57
$credential_id = intval($_GET['id']);
68

79
$sql = mysqli_query($mysqli, "SELECT * FROM credentials WHERE credential_id = $credential_id LIMIT 1");
@@ -32,6 +34,8 @@
3234
$credential_tag_id_array[] = $credential_tag_id;
3335
}
3436

37+
enforceClientAccess();
38+
3539
// Generate the HTML form content using output buffering.
3640
ob_start();
3741
?>

agent/modals/credential/credential_view.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
require_once '../../../includes/modal_header.php';
44

5+
enforceUserPermission('module_credential');
6+
57
$credential_id = intval($_GET['id']);
68

79
$sql = mysqli_query($mysqli, "SELECT * FROM credentials WHERE credential_id = $credential_id LIMIT 1");
810

911
$row = mysqli_fetch_assoc($sql);
12+
$client_id = intval($row['credential_client_id']);
1013
$credential_name = nullable_htmlentities($row['credential_name']);
1114
$credential_description = nullable_htmlentities($row['credential_description']);
1215
$credential_uri = nullable_htmlentities($row['credential_uri']);
@@ -23,6 +26,8 @@
2326
$credential_note = nullable_htmlentities($row['credential_note']);
2427
$credential_created_at = nullable_htmlentities($row['credential_created_at']);
2528

29+
enforceClientAccess();
30+
2631
// Generate the HTML form content using output buffering.
2732
ob_start();
2833
?>

agent/modals/payment/payment_add.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
$account_id = intval($row['account_id']);
9696
$account_name = nullable_htmlentities($row['account_name']);
9797
$opening_balance = floatval($row['opening_balance']);
98+
$account_currency = nullable_htmlentities($row['account_currency_code']);
9899

99100
$sql_payments = mysqli_query($mysqli, "SELECT SUM(payment_amount) AS total_payments FROM payments WHERE payment_account_id = $account_id");
100101
$row = mysqli_fetch_assoc($sql_payments);
@@ -113,7 +114,7 @@
113114
?>
114115
<option <?php if ($config_default_payment_account == $account_id) { echo "selected"; } ?>
115116
value="<?php echo $account_id; ?>">
116-
<?php echo $account_name; ?> [$<?php echo number_format($account_balance, 2); ?>]
117+
<?php echo $account_name; ?> [<?php echo numfmt_format_currency($currency_format, $account_balance, $account_currency); ?>]
117118
</option>
118119

119120
<?php

0 commit comments

Comments
 (0)