From 8aa5cf530ba853b30d1b19d8316e4da51248bed7 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Tue, 16 Jan 2024 12:33:16 -0800 Subject: [PATCH 1/4] Improve radio button values in custom report form --- app/Http/Controllers/ReportsController.php | 4 ++-- resources/views/reports/custom.blade.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 5c55376c85..3e8afab401 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -718,10 +718,10 @@ class ReportsController extends Controller if ($request->filled('exclude_archived')) { $assets->notArchived(); } - if ($request->input('deleted_assets') == '1') { + if ($request->input('deleted_assets') == 'include_deleted') { $assets->withTrashed(); } - if ($request->input('deleted_assets') == '0') { + if ($request->input('deleted_assets') == 'only_deleted') { $assets->onlyTrashed(); } diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index cc0ec158af..0702f0332e 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -434,15 +434,15 @@
From aceb072a1b49b8c3fa50336c06ea37c995349728 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 18 Jan 2024 11:49:30 +0000 Subject: [PATCH 2/4] Updated URL for apple manufacturer Signed-off-by: snipe --- resources/lang/en-US/admin/manufacturers/message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en-US/admin/manufacturers/message.php b/resources/lang/en-US/admin/manufacturers/message.php index 8776358499..61416e0230 100644 --- a/resources/lang/en-US/admin/manufacturers/message.php +++ b/resources/lang/en-US/admin/manufacturers/message.php @@ -2,7 +2,7 @@ return array( - 'support_url_help' => 'Variables {LOCALE}, {SERIAL}, {MODEL_NUMBER}, and {MODEL_NAME} may be used in your URL to have those values auto-populate when viewing assets - for example https://support.apple.com/{LOCALE}/{SERIAL}.', + 'support_url_help' => 'Variables {LOCALE}, {SERIAL}, {MODEL_NUMBER}, and {MODEL_NAME} may be used in your URL to have those values auto-populate when viewing assets - for example https://checkcoverage.apple.com/{LOCALE}/{SERIAL}.', 'does_not_exist' => 'Manufacturer does not exist.', 'assoc_users' => 'This manufacturer is currently associated with at least one model and cannot be deleted. Please update your models to no longer reference this manufacturer and try again. ', From a1ccea4e34a7ce63281971ba5dad315a39d2d8be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 08:50:37 +0000 Subject: [PATCH 3/4] Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests-mysql.yml | 2 +- .github/workflows/tests-sqlite.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-mysql.yml b/.github/workflows/tests-mysql.yml index 7c06599760..4731585837 100644 --- a/.github/workflows/tests-mysql.yml +++ b/.github/workflows/tests-mysql.yml @@ -43,7 +43,7 @@ jobs: id: composer-cache run: | echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/tests-sqlite.yml b/.github/workflows/tests-sqlite.yml index 5b41c60dea..405dc92134 100644 --- a/.github/workflows/tests-sqlite.yml +++ b/.github/workflows/tests-sqlite.yml @@ -31,7 +31,7 @@ jobs: id: composer-cache run: | echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }} From 3bc1b9038d0288f20b530636e495dea3a2305cdf Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 24 Jan 2024 11:54:29 +0000 Subject: [PATCH 4/4] Fix for LDAP syncing with base_dn and location_id and location --- app/Console/Commands/LdapSync.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index e861b9af37..05f60ee4e1 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -88,18 +88,20 @@ class LdapSync extends Command /** * if a location ID has been specified, use that OU */ - if ( $this->option('location_id') != '') { + if ( $this->option('location_id') ) { foreach($this->option('location_id') as $location_id){ $location_ou = Location::where('id', '=', $location_id)->value('ldap_ou'); $search_base = $location_ou; Log::debug('Importing users from specified location OU: \"'.$search_base.'\".'); } + } /** - * Otherwise if a manual base DN has been specified, use that + * if a manual base DN has been specified, use that. Allow the Base DN to override + * even if there's a location-based DN - if you picked it, you must have picked it for a reason. */ - } elseif ($this->option('base_dn') != '') { + if ($this->option('base_dn') != '') { $search_base = $this->option('base_dn'); Log::debug('Importing users from specified base DN: \"'.$search_base.'\".'); } @@ -125,14 +127,14 @@ class LdapSync extends Command /* Determine which location to assign users to by default. */ $location = null; // TODO - this would be better called "$default_location", which is more explicit about its purpose - if ($this->option('location') != '') { - if ($location = Location::where('name', '=', $this->option('location'))->first()) { - Log::debug('Location name ' . $this->option('location') . ' passed'); - Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')'); - } + if ($this->option('location') != '') { + if ($location = Location::where('name', '=', $this->option('location'))->first()) { + Log::debug('Location name ' . $this->option('location') . ' passed'); + Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')'); + } - } elseif ($this->option('location_id') != '') { - foreach($this->option('location_id') as $location_id) { + } elseif ($this->option('location_id')) { + foreach($this->option('location_id') as $location_id) { if ($location = Location::where('id', '=', $location_id)->first()) { Log::debug('Location ID ' . $location_id . ' passed'); Log::debug('Importing to ' . $location->name . ' (' . $location->id . ')');