Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eceeb4a
return if there is no item for the audit notification
Godmartinz Nov 20, 2025
e598ef6
adds tests, webhook enable settings
Godmartinz Nov 20, 2025
24d7ae4
added google chat to audit notifications"
Godmartinz Nov 20, 2025
1116da3
add google chat to audit notification test
Godmartinz Nov 20, 2025
cd42760
notes
Godmartinz Nov 20, 2025
12491f2
adjusted Tests
JonasGoseberg Nov 21, 2025
b9933cd
implemented LegacyAdvancedSearch again
JonasGoseberg Nov 21, 2025
fd76410
Merge pull request #105 from imbus/SIT-173-OldAdvancedSearchDoesntWor…
cz-lucas Nov 21, 2025
48270cb
url trim
Godmartinz Nov 21, 2025
33839d7
Re-added the horizontal class
snipe Nov 22, 2025
644ef04
Merge pull request #18226 from Godmartinz/audit-notification-rb-19608
snipe Nov 22, 2025
aa959fb
Added filter form request to validate JSON
snipe Nov 22, 2025
69994e0
Merge pull request #18232 from grokability/check-for-valid-json-on-fi…
snipe Nov 22, 2025
7f76198
Fixed RB-20501 - correctly return error response when license+seat do…
snipe Nov 23, 2025
7a1ccb0
Nicer query
snipe Nov 23, 2025
e288c94
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 24, 2025
3e343fe
Merge pull request #18236 from grokability/dependabot/github_actions/…
snipe Nov 24, 2025
a1c67b5
Fixed user details toggle
snipe Nov 24, 2025
8231407
Updated translations
snipe Nov 24, 2025
c7cb467
Bumped version
snipe Nov 24, 2025
fea2888
Merge remote-tracking branch 'upstream/develop' into rebase-20251124
cz-lucas Nov 24, 2025
d778a24
Merge pull request #108 from imbus/rebase-20251124
cz-lucas Nov 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/SA-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Crowdin push
uses: crowdin/github-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v5
uses: actions/checkout@v6

# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v5
uses: actions/checkout@v6

# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Docker Hub Description
uses: grokability/dockerhub-description@7ea9d275c7cdbe2b676a093a0308c50665e3b8b4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none

- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Get Composer Cache Directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none

- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Get Composer Cache Directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none

- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Get Composer Cache Directory
id: composer-cache
Expand Down
35 changes: 21 additions & 14 deletions app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,39 @@
namespace App\Http\Controllers\Api;

use App\Events\CheckoutableCheckedIn;
use App\Http\Requests\StoreAssetRequest;
use App\Http\Requests\UpdateAssetRequest;
use App\Http\Traits\MigratesLegacyAssetLocations;
use App\Http\Transformers\ComponentsTransformer;
use App\Models\AccessoryCheckout;
use App\Models\CheckoutAcceptance;
use App\Models\LicenseSeat;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Gate;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetCheckoutRequest;
use App\Http\Requests\FilterRequest;
use App\Http\Requests\StoreAssetRequest;
use App\Http\Requests\UpdateAssetRequest;
use App\Http\Traits\MigratesLegacyAssetLocations;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\ComponentsTransformer;
use App\Http\Transformers\LicensesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\AccessoryCheckout;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\CustomField;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\Location;
use App\Models\PredefinedFilter;
use App\Models\Setting;
use App\Models\User;
use App\View\Label;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;
use App\View\Label;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;

Expand All @@ -57,7 +58,7 @@ class AssetsController extends Controller
* @param int $assetId
* @since [v4.0]
*/
public function index(Request $request, $action = null, $upcoming_status = null):JsonResponse|array
public function index(FilterRequest $request, $action = null, $upcoming_status = null):JsonResponse|array
{


Expand Down Expand Up @@ -147,6 +148,12 @@ public function index(Request $request, $action = null, $upcoming_status = null)
$filter = json_decode($request->input('filter'), true);
}

if (!isset($filter[0]['field'])){
$filter = array_filter($filter, function ($key) use ($allowed_columns){
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}

$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[] = $field->db_column_name();
Expand Down
15 changes: 6 additions & 9 deletions app/Http/Controllers/Api/LicenseSeatsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,14 @@ public function show($licenseId, $seatId) : JsonResponse | array
{

$this->authorize('view', License::class);
// sanity checks:
// 1. does the license seat exist?
if (! $licenseSeat = LicenseSeat::find($seatId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'Seat not found'));
}
// 2. does the seat belong to the specified license?
if (! $licenseSeat = $licenseSeat->license()->first() || $licenseSeat->id != intval($licenseId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'Seat does not belong to the specified license'));

if ($licenseSeat = LicenseSeat::where('license_id', $licenseId)->find($seatId)) {
return (new LicenseSeatsTransformer)->transformLicenseSeat($licenseSeat);
}

return (new LicenseSeatsTransformer)->transformLicenseSeat($licenseSeat);
return response()->json(Helper::formatStandardApiResponse('error', null, 'Seat ID or license not found or the seat does not belong to this license'));


}

/**
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Api/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use Illuminate\Support\Facades\Log;
use App\Http\Requests\DeleteUserRequest;
use Illuminate\Http\JsonResponse;
use App\Http\Requests\FilterRequest;

class UsersController extends Controller
{
Expand All @@ -42,7 +43,7 @@ class UsersController extends Controller
*
* @return array
*/
public function index(Request $request) : array
public function index(FilterRequest $request) : array
{
$this->authorize('view', User::class);

Expand Down
29 changes: 29 additions & 0 deletions app/Http/Requests/FilterRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace App\Http\Requests;

use App\Rules\ValidJson;
use Illuminate\Foundation\Http\FormRequest;

class FilterRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}

/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'filter' => ['nullable', new ValidJson()],
];
}
}
Loading
Loading