From 8ff109e9da9fc18650ae87b15bf348a73b979500 Mon Sep 17 00:00:00 2001 From: Phan Nguyen Date: Sat, 8 Oct 2022 12:54:15 +0700 Subject: [PATCH 1/6] Correct comparison logic Comparison operator should be greater than or equal --- app/Http/Controllers/Api/LicenseSeatsController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/LicenseSeatsController.php b/app/Http/Controllers/Api/LicenseSeatsController.php index 4d0fe0994..759f11e95 100644 --- a/app/Http/Controllers/Api/LicenseSeatsController.php +++ b/app/Http/Controllers/Api/LicenseSeatsController.php @@ -39,7 +39,7 @@ class LicenseSeatsController extends Controller } $total = $seats->count(); - $offset = (($seats) && (request('offset') > $total)) ? 0 : request('offset', 0); + $offset = (($seats) && (request('offset') >= $total)) ? 0 : request('offset', 0); $limit = request('limit', 50); $seats = $seats->skip($offset)->take($limit)->get(); From 36eb51b52f11156f64d64bbd5f57988fe2af18d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Oct 2022 08:36:34 +0000 Subject: [PATCH 2/6] Bump actions/checkout from 2 to 3.1.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/SA-codeql.yml | 2 +- .github/workflows/codacy-analysis.yml | 2 +- .github/workflows/docker-alpine.yml | 2 +- .github/workflows/docker.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/SA-codeql.yml b/.github/workflows/SA-codeql.yml index a98bf955f..d76c898e1 100644 --- a/.github/workflows/SA-codeql.yml +++ b/.github/workflows/SA-codeql.yml @@ -26,7 +26,7 @@ jobs: language: [ 'javascript' ] steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/codacy-analysis.yml b/.github/workflows/codacy-analysis.yml index ffc488c90..819829f5a 100644 --- a/.github/workflows/codacy-analysis.yml +++ b/.github/workflows/codacy-analysis.yml @@ -32,7 +32,7 @@ jobs: steps: # Checkout the repository to the GitHub Actions runner - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis - name: Run Codacy Analysis CLI diff --git a/.github/workflows/docker-alpine.yml b/.github/workflows/docker-alpine.yml index aad3a77cc..1eafe33cf 100644 --- a/.github/workflows/docker-alpine.yml +++ b/.github/workflows/docker-alpine.yml @@ -41,7 +41,7 @@ jobs: steps: # https://github.com/actions/checkout - name: Checkout codebase - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 # https://github.com/docker/setup-buildx-action - name: Setup Docker Buildx diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 19c6d2588..f166a29f8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -41,7 +41,7 @@ jobs: steps: # https://github.com/actions/checkout - name: Checkout codebase - uses: actions/checkout@v2 + uses: actions/checkout@v3.1.0 # https://github.com/docker/setup-buildx-action - name: Setup Docker Buildx From d3161fad020ecce2eab0fb7f48b166a07be14f11 Mon Sep 17 00:00:00 2001 From: Phan Nguyen Date: Tue, 11 Oct 2022 15:49:56 +0700 Subject: [PATCH 3/6] Remove required mark Because it actually not required by model. --- resources/views/licenses/edit.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index b8b0e13a6..0936f8b2b 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -34,7 +34,7 @@ @include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id']) -@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id', 'required' => 'true']) +@include ('partials.forms.edit.manufacturer-select', ['translated_name' => trans('general.manufacturer'), 'fieldname' => 'manufacturer_id',])
From a499a92bb71bc4f311c9268307668f6ba4a6467c Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 12 Oct 2022 10:57:20 -0700 Subject: [PATCH 4/6] Added @nh314 as a contributor Signed-off-by: snipe --- .all-contributorsrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index a373eb207..11f05869c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -2736,7 +2736,7 @@ "avatar_url": "https://avatars.githubusercontent.com/u/111710123?v=4", "profile": "https://github.com/Vautia", "contributions": [ - "security" + "code" ] }, { @@ -2756,6 +2756,15 @@ "contributions": [ "code" ] + }, + { + "login": "nh314", + "name": "Phan Nguyen", + "avatar_url": "https://avatars.githubusercontent.com/u/6006620?v=4", + "profile": "https://github.com/nh314", + "contributions": [ + "code" + ] } ] } From 5ff72420a6a4406676b49e21efc6fb33a83d8799 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 12 Oct 2022 11:00:06 -0700 Subject: [PATCH 5/6] Set branch back to develop I hads to switch branches because the automated GH action script always targets masterb Signed-off-by: snipe --- config/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/version.php b/config/version.php index 9f8b9a698..8604157fe 100644 --- a/config/version.php +++ b/config/version.php @@ -6,5 +6,5 @@ return array ( 'prerelease_version' => '', 'hash_version' => 'g61fa0bda4', 'full_hash' => 'v6.0.11-145-g61fa0bda4', - 'branch' => 'master', + 'branch' => 'develop', ); \ No newline at end of file From ac055c01dc79166b473b31fc64e0496c561d4425 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 12 Oct 2022 15:59:43 -0700 Subject: [PATCH 6/6] Use admin ID for audit log notification Signed-off-by: snipe --- app/Models/Loggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Loggable.php b/app/Models/Loggable.php index cf5eabc67..53ff279a0 100644 --- a/app/Models/Loggable.php +++ b/app/Models/Loggable.php @@ -189,7 +189,7 @@ trait Loggable $params = [ 'item' => $log->item, 'filename' => $log->filename, - 'admin' => $log->user, + 'admin' => $log->admin, 'location' => ($location) ? $location->name : '', 'note' => $note, ];