Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent setting assigned_to without setting assigned_type #15629

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
399 commits
Select commit Hold shift + click to select a range
07a51ec
Merge pull request #15712 from Godmartinz/fix_import-progress-bar
snipe Oct 24, 2024
dfc6364
Merge pull request #15550 from uberbrady/fix_multi_create_partial_fai…
snipe Oct 24, 2024
57107c4
fixed last test, definetly the last test
Godmartinz Oct 24, 2024
18760e3
replaces teams notification package, passes integration test
Godmartinz Oct 24, 2024
b29a2a6
removing header color from login button
akemidx Oct 24, 2024
18da80e
fix checkoutable listener for microsoft teams
Godmartinz Oct 24, 2024
5636549
remove unnecessary fields in accessory checkout mail
Godmartinz Oct 24, 2024
e27ff13
adds check in and checkout message for assets
Godmartinz Oct 24, 2024
cce75a8
adds check in and checkout messag for accessories
Godmartinz Oct 24, 2024
278bc5e
ads check in and checkout message for license seats
Godmartinz Oct 24, 2024
6f0c1b1
this adds check out message for consumables
Godmartinz Oct 24, 2024
ce68f55
remove alert emails from cc
Godmartinz Oct 24, 2024
58ff641
removed unused variables
Godmartinz Oct 25, 2024
4d848e4
Fixed #15736
snipe Oct 28, 2024
589f9cc
Fixed #15732
snipe Oct 28, 2024
86d784b
Fixed #15740 - use non-translated strings for icons
snipe Oct 28, 2024
5c49716
Dump logs on test failure
marcusmoore Oct 28, 2024
b987b3d
adds back the laravel channels package and applies a deprecated check
Godmartinz Oct 28, 2024
2d318b3
Merge pull request #15744 from marcusmoore/chore/action-tests-debugging
snipe Oct 28, 2024
ed81973
adds notifications for deprecation
Godmartinz Oct 28, 2024
c0620c2
adds back laravels channel formats
Godmartinz Oct 28, 2024
e7c4343
readd checkin accessory format
Godmartinz Oct 28, 2024
c24f79c
update method comment
Godmartinz Oct 28, 2024
6128765
change wording on notification button
Godmartinz Oct 28, 2024
9a0eee8
revert testing variables
Godmartinz Oct 28, 2024
05875eb
Updated translations
snipe Oct 28, 2024
f0813e0
Merge pull request #15681 from Godmartinz/seperating_notification_n_mail
snipe Oct 30, 2024
f68df1f
Made type searchable in action logs
snipe Oct 30, 2024
d6ba303
Merge branch 'develop' into refacto_ms_teams_notifs
Godmartinz Oct 30, 2024
b26cae3
merged in develop
Godmartinz Oct 30, 2024
73772a0
change button text
Godmartinz Oct 30, 2024
bd23772
changes cc_email validation to allow array
Godmartinz Oct 30, 2024
73e8f16
Merge pull request #15756 from Godmartinz/cc-email-array
snipe Oct 30, 2024
f108076
fixing bulk delete table
akemidx Oct 30, 2024
69e74bb
Fix ${var} deprecation warning in License model
Oct 31, 2024
7e996c4
Merge pull request #15758 from snipe/jerm/fix-deprecation-warning
snipe Oct 31, 2024
49de070
Merge pull request #15731 from Godmartinz/refacto_ms_teams_notifs
snipe Oct 31, 2024
e659420
send emails even if target has no email
Godmartinz Oct 31, 2024
97a449e
removes instanceof User check
Godmartinz Oct 31, 2024
7a0f79e
remove test route
Godmartinz Oct 31, 2024
3791380
remove unused uses
Godmartinz Oct 31, 2024
21a27dc
fixed conflicts
Godmartinz Oct 31, 2024
5897d37
Merge pull request #15763 from Godmartinz/no_to_email_check
snipe Oct 31, 2024
d6c7dc8
Add missing livewire file
marcusmoore Oct 31, 2024
f32ebdc
Merge pull request #15765 from marcusmoore/chore/add-missing-livewire…
snipe Oct 31, 2024
2e96d47
Revert "Added the display of logs when tests fail in GitHub Actions"
marcusmoore Nov 4, 2024
287f4ad
Merge pull request #15771 from snipe/revert-15744-chore/action-tests-…
snipe Nov 4, 2024
0d707a1
fixes notifications for licenses and asset to asset checkouables
Godmartinz Nov 4, 2024
93494ac
put dataprovider back in for tests
Godmartinz Nov 4, 2024
e7cb4a7
Show accessory checkout id in user accessory table
marcusmoore Nov 4, 2024
2362cb5
refactor to getNotifiables
Godmartinz Nov 5, 2024
2f5e468
this fixes the assigned to piece
akemidx Nov 5, 2024
82c38a8
or statement for if/else
akemidx Nov 5, 2024
3965bcd
Merge pull request #15773 from Godmartinz/Fix_failing_failing_tests
snipe Nov 6, 2024
654f67b
Updated webpack
snipe Nov 6, 2024
bab1e58
symfony/http-client CVE-2024-50342, symfony/http-foundation CVE-2024-…
joelpittet Nov 6, 2024
b96a312
Merge pull request #15779 from ubc-cpsc/bugfix/CVE-2024-50345
snipe Nov 6, 2024
ad99b8b
Use generic ID translation
marcusmoore Nov 6, 2024
9c1c93a
Merge pull request #15774 from marcusmoore/feature/sc-27350
snipe Nov 6, 2024
aa168fc
Updated BS table to 1.23.5
snipe Nov 6, 2024
4fcf5ac
Add new indexes to locations and users for faster manager lookups
uberbrady Nov 6, 2024
a41529d
Merge pull request #15780 from uberbrady/add_manager_indexes
snipe Nov 6, 2024
2db7037
Fix Indentation in UsersController
Toreg87 Nov 7, 2024
0508318
Improved indexes on manager_id for locations and users, including del…
uberbrady Nov 7, 2024
5ef3183
Merge pull request #15783 from uberbrady/improve_user_and_location_ma…
snipe Nov 7, 2024
ca4bafc
adds a dark background to fieldsets, fixes right border
Godmartinz Nov 7, 2024
000f317
Upgrade jspdf-autotable from 3.8.3 to 3.8.4 #15786
snipe Nov 8, 2024
6928b1b
Added eol date to bulk asset edit
snipe Nov 10, 2024
357ef7e
Merge pull request #15792 from snipe/edit_eol_from_bulk
snipe Nov 10, 2024
47b2cdb
Allow user to specify null for calculation or explicit on bulk edit
snipe Nov 10, 2024
b6ad69f
Merge pull request #15793 from snipe/allow_eol_explicit
snipe Nov 10, 2024
1fc5bb5
Check that the file exists before trying to download
snipe Nov 11, 2024
6bec573
Merge pull request #15794 from snipe/check_for_file_on_asset_acceptance
snipe Nov 11, 2024
22c79d8
Squashed commit of the following:
snipe Nov 12, 2024
787340b
Merge pull request #14441 from Godmartinz/ldap_location-resync
snipe Nov 12, 2024
48713cb
Added additional helper files to assetmodel importer
snipe Nov 12, 2024
832ccc6
updated deprecated trigger for ms teams
Godmartinz Nov 12, 2024
4e0d70e
checkin notif was missing
Godmartinz Nov 12, 2024
947351a
removed unused variabl
Godmartinz Nov 13, 2024
c012bf0
Merge pull request #15799 from Godmartinz/update_deprecated_trigger_f…
snipe Nov 13, 2024
615edbb
Updated seeder
snipe Nov 13, 2024
b3f84f7
Added aliases, removed depreciation from import
snipe Nov 13, 2024
d1ba16d
Added requestable to fillable
snipe Nov 13, 2024
6c2cfe0
Removed log line
snipe Nov 13, 2024
6f25ed3
More nuance to human boolean check
snipe Nov 13, 2024
abab062
Added fieldset and depreciation import
snipe Nov 13, 2024
f87ebb4
Fixed tests
snipe Nov 13, 2024
752221e
Removed error log
snipe Nov 13, 2024
503d044
Don’t show new user welcome if location or asset model import
snipe Nov 13, 2024
3d3e3a9
Squashed commit of the following:
snipe Nov 13, 2024
3740b58
Re-added assetmodel import factory
snipe Nov 13, 2024
220902a
Merge branch 'develop' into features/import_models
snipe Nov 13, 2024
4afe873
Fixed tests, updated CSV
snipe Nov 13, 2024
69e3673
Updated CSV
snipe Nov 13, 2024
74ca561
Fixed welcome email toggle
snipe Nov 13, 2024
2f943bc
Better error messaging for bad fields
snipe Nov 13, 2024
813b304
Fixed tests
snipe Nov 13, 2024
85dbbdb
wtf
snipe Nov 13, 2024
66aaafc
Updated variable name
snipe Nov 13, 2024
4d3137e
Added $accessory->created_by = auth()->id();
snipe Nov 13, 2024
0ae1db6
Added created_by
snipe Nov 13, 2024
0a6096e
Updated method name
snipe Nov 13, 2024
d7e5fe5
Use auth facade
snipe Nov 13, 2024
54f7917
Added created by
snipe Nov 13, 2024
8c3b50d
Added created by
snipe Nov 13, 2024
3a1fb61
Added admin sort scope
snipe Nov 13, 2024
b6dbb88
Added created by
snipe Nov 13, 2024
0c3b8cb
Moved created by to create only
snipe Nov 13, 2024
d4018a2
Added created_by to models API
snipe Nov 13, 2024
1aef7ed
Added created by to the import itself
snipe Nov 13, 2024
d3602c0
Allow sorting on admin name in API
snipe Nov 13, 2024
7c3f9ba
Fixed tests
snipe Nov 13, 2024
4a18946
Added created by to imports
snipe Nov 13, 2024
6fee533
Updated CSV
snipe Nov 13, 2024
6f700cc
Added relationship for adminuser
snipe Nov 13, 2024
4841b89
scratch code for this issue
spencerrlongg Nov 13, 2024
1caf73f
Fixed casing, fixed typo
snipe Nov 13, 2024
304fddb
Removed unused test
snipe Nov 13, 2024
2e340f9
Two more case fixes
snipe Nov 13, 2024
7ccbc60
Chaneg to ucfirst for Assetmodel -> AssetModel
snipe Nov 13, 2024
92ae726
Updated laravel, additional packages
snipe Nov 13, 2024
52dceda
Merge pull request #15804 from snipe/update_laravel
snipe Nov 13, 2024
d7b60b3
fix serial check in markdown
Godmartinz Nov 13, 2024
ab2e7a3
Merge pull request #15805 from Godmartinz/license-markdown-fix
snipe Nov 13, 2024
8389c03
improved logging in checkoutable listener
Godmartinz Nov 13, 2024
3c08760
Merge pull request #15802 from snipe/features/import_models
snipe Nov 13, 2024
f2fc110
Merge pull request #15806 from Godmartinz/improved-checkoutable-logging
snipe Nov 13, 2024
0a87b0b
Merge pull request #15784 from Godmartinz/Fieldset_table_borders
snipe Nov 13, 2024
02ba13b
Merge pull request #15730 from akemidx/bug/sc-26974-2
snipe Nov 13, 2024
823af33
Patch for whitespace causing HTTP 500 errors.
DarrenRainey Nov 13, 2024
1061df8
fix user checkout license category email check
Godmartinz Nov 13, 2024
ada8e77
Added location to asset view
snipe Nov 13, 2024
381c6e0
Merge pull request #15808 from Godmartinz/check-license-for-email-boo…
snipe Nov 13, 2024
796a397
Merge pull request #15807 from DarrenRainey/develop
snipe Nov 13, 2024
9d2cbc4
Add @DarrenRainey as a contributor
snipe Nov 13, 2024
73383c6
Merge pull request #15782 from Toreg87/fixes/indentation_userscontroller
snipe Nov 13, 2024
ac3ae65
Remove incorrect typehint
marcusmoore Nov 13, 2024
c399d79
Add conditional for microsoft team integration version
marcusmoore Nov 13, 2024
e80a456
Remove duplicate method
marcusmoore Nov 13, 2024
5084843
Merge pull request #15809 from marcusmoore/fixes/teams
snipe Nov 13, 2024
e185b2b
Bumped hash
snipe Nov 13, 2024
0ba8619
Updated dev assets
snipe Nov 13, 2024
cb7e47a
Updated translations
snipe Nov 13, 2024
9cb411c
removing required form div container
akemidx Nov 13, 2024
efeef5c
removing || parts of if else
akemidx Nov 13, 2024
f7dcfca
Bumped version
snipe Nov 13, 2024
a060f60
Versioning stuff is hard - fixed v7.0.14 to v7.1.14
snipe Nov 14, 2024
3982201
this should work in theory - local is screwy though
spencerrlongg Nov 14, 2024
25163d1
working except for null 🤔
spencerrlongg Nov 14, 2024
7e7cbc4
seems to work just fine now, needs translations
spencerrlongg Nov 14, 2024
8c6869f
note and rm dump and comment
spencerrlongg Nov 14, 2024
4e28650
Specify table name in select
snipe Nov 14, 2024
70d9ef4
Merge pull request #15811 from snipe/small_fix_for_embiguous_created_by
snipe Nov 14, 2024
364410a
Merge pull request #15558 from maciej-poleszczyk/develop
snipe Nov 14, 2024
3e131d5
Add @maciej-poleszczyk as a contributor
snipe Nov 14, 2024
940f1c2
Fixed #15812 - regression in action_type search
snipe Nov 14, 2024
075e350
Removed Twitter links
snipe Nov 14, 2024
a0b8483
Removed extra sort
snipe Nov 14, 2024
c093b45
Fixed anchor links
snipe Nov 14, 2024
702621e
replace the via channel class
Godmartinz Nov 14, 2024
23038ab
removes tag if qr code is not present
Godmartinz Nov 14, 2024
306c97b
Merge pull request #15816 from Godmartinz/Teams_fix
snipe Nov 14, 2024
95cd779
translations and attribute names
spencerrlongg Nov 14, 2024
0f1f6bc
fixed rest of dymos
Godmartinz Nov 14, 2024
8465806
rm unnecessary imports
spencerrlongg Nov 14, 2024
838a6d0
Corrected route name for filestable on assets
snipe Nov 14, 2024
636e466
Fixed delete model file route
snipe Nov 14, 2024
7b7a848
Merge pull request #15819 from snipe/fixes_asset_file_deletion
snipe Nov 14, 2024
124f9c8
oops, something went wrong translation
spencerrlongg Nov 14, 2024
f2faf58
Merge pull request #15817 from Godmartinz/label_fix
snipe Nov 14, 2024
b4a2a4e
Fixed #15820 - added model number to view-assets
snipe Nov 14, 2024
add3edb
Merge pull request #15822 from snipe/add_model_number_to_view_assets
snipe Nov 14, 2024
09b7db5
Additional fix for #15817
snipe Nov 14, 2024
187e231
Fixed #15825
snipe Nov 15, 2024
e8d1093
Fixed admin user not showing in download all activity report
snipe Nov 15, 2024
3fb543b
Merge pull request #15828 from snipe/bug/sc-27500
snipe Nov 15, 2024
d14f43f
replace env with config variable for from address
Godmartinz Nov 18, 2024
0209d27
Fix rollback for created_by
marcusmoore Nov 18, 2024
f520607
Fix rollback for webhook_endpoint by using correct column type
marcusmoore Nov 18, 2024
f533cdc
update default from address to alternate config variable
Godmartinz Nov 18, 2024
d60ac0c
Merge pull request #15840 from marcusmoore/fixes/migration-rollbacks
snipe Nov 19, 2024
8f72231
Merge pull request #15757 from akemidx/bug/sc-26944
snipe Nov 19, 2024
889aff4
Feature: Added API endpoint for generating asset labels
NebelKreis Nov 19, 2024
66d6b01
Feature: Added translations for label generation API endpoint
NebelKreis Nov 19, 2024
5639a84
Feature: Added API route for asset label generation
NebelKreis Nov 19, 2024
15a31bd
Fixed variable name
snipe Nov 19, 2024
d576016
Merge pull request #15845 from snipe/bug/sc-27523
snipe Nov 19, 2024
30a6a67
Indicate requiredness on status select on bulk user checkin+delete
snipe Nov 19, 2024
5a5f108
Merge pull request #15848 from snipe/chore/sc-27531
snipe Nov 19, 2024
22602c7
use existing validation strings
spencerrlongg Nov 19, 2024
b513575
add testing example var MAIL_FROM_ADDR
Godmartinz Nov 19, 2024
99de639
fix mail.from.address variables in config, simplify envelop[ variable
Godmartinz Nov 19, 2024
1e51331
adding colon to password translation
akemidx Nov 19, 2024
59fe538
Add tests around component check ins via api
marcusmoore Nov 20, 2024
e8cad0d
Formatting
marcusmoore Nov 20, 2024
da4c877
Use === over ==
marcusmoore Nov 20, 2024
51a0767
Add tests around deleting component via ui
marcusmoore Nov 20, 2024
54f5f46
Improve check for image existence
marcusmoore Nov 20, 2024
cca7600
Merge pull request #15852 from marcusmoore/testing/ui-delete-component
snipe Nov 20, 2024
61eff02
Feature: Added category to asset checkout email
NebelKreis Nov 20, 2024
4304af0
Feature: Added category to asset checkin email
NebelKreis Nov 20, 2024
eb02624
Feature: Added category to asset acceptance/decline email
NebelKreis Nov 20, 2024
7618169
Feature: Added category to asset requested email
NebelKreis Nov 20, 2024
d5c141d
Fix: Removed setting validation as it is not strictly necessary
NebelKreis Nov 20, 2024
8cd4b33
Merge pull request #15847 from NebelKreis/feature/hardware-label-gene…
snipe Nov 20, 2024
5522def
Merge pull request #15854 from NebelKreis/feature/add-category-to-ass…
snipe Nov 20, 2024
f7c1fc8
no checked out to email doesnt trigger a 500
Godmartinz Nov 20, 2024
f932a4f
Always run validation on checkin
marcusmoore Nov 20, 2024
9bbd802
Use database file for sqlite in GitHub Action for tests
marcusmoore Nov 20, 2024
0a3bca0
Merge pull request #15860 from marcusmoore/tests/switch-to-file-for-s…
snipe Nov 20, 2024
6969b8b
remove the changes to mail.from.address default
Godmartinz Nov 20, 2024
d65254c
Add tests for component checkout api endpoint
marcusmoore Nov 20, 2024
e05f443
Merge pull request #15864 from marcusmoore/testing/api-component-chec…
snipe Nov 21, 2024
3a683d8
Merge pull request #15859 from Godmartinz/remove_name_null_warning
snipe Nov 21, 2024
2a21cce
Merge pull request #15839 from Godmartinz/fix-mail-envelope-variable
snipe Nov 21, 2024
85c1b0e
[Snyk] Upgrade jquery-ui from 1.14.0 to 1.14.1 #15868
snipe Nov 21, 2024
8b38dc8
Merge pull request #15851 from marcusmoore/testing/api-component-checkin
snipe Nov 21, 2024
b7aedb7
Merge pull request #15818 from spencerrlongg/bug/sc-27213
snipe Nov 21, 2024
424316d
fixing colon placements
akemidx Nov 21, 2024
feba860
Merge pull request #15850 from akemidx/bug/sc-27448
snipe Nov 21, 2024
d037807
Always call resizeCanvas
marcusmoore Nov 21, 2024
9f49c25
WIP: move signature pad creation up and add debugging
marcusmoore Nov 21, 2024
87756ca
Remove debugging
marcusmoore Nov 21, 2024
dd223fc
commit for testing
akemidx Nov 22, 2024
0d60855
orange bar for requirednessness
akemidx Nov 22, 2024
f125c90
Merge pull request #15870 from marcusmoore/bug/sc-26857
snipe Nov 22, 2024
0f18ee8
Updated translations
snipe Nov 25, 2024
30b481b
Updated version
snipe Nov 25, 2024
60642cd
fix user api update from clearing location_id unnecessarily
Godmartinz Nov 26, 2024
021e829
fixed mobile view of assets
Godmartinz Nov 26, 2024
37e091a
Merge pull request #15889 from Godmartinz/Fix-user-API-location-update
snipe Nov 26, 2024
15c9df0
fix mobile view for asset and user
Godmartinz Nov 26, 2024
fa80716
Merge pull request #15890 from Godmartinz/mobile-view-fix
snipe Nov 26, 2024
fcbd5dc
Harden asset checkout validation by requiring ints
marcusmoore Nov 26, 2024
2727210
requested changes from pr
akemidx Nov 26, 2024
a7dae10
fixing line
akemidx Nov 26, 2024
82108f8
Merge pull request #15208 from akemidx/feature/sc-26415
snipe Nov 26, 2024
0f1d10b
Dev assets
snipe Nov 26, 2024
11f83b4
Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
snipe Nov 26, 2024
2cb1b6d
Use transformer on API update
snipe Nov 27, 2024
46be1ad
Merge pull request #15892 from marcusmoore/bug/harden-checkout-valida…
snipe Nov 27, 2024
ee4a54b
Fixed order by notes for users
snipe Nov 27, 2024
716c67d
Fixed #15901 - re-added required indicator on text and select custom …
snipe Dec 2, 2024
2220828
Merge pull request #15904 from snipe/fixes/#15901
snipe Dec 2, 2024
66e1fac
Prevent setting assigned_to without setting assigned_type
uberbrady Oct 7, 2024
7aadc08
Fixed tests to include assigned_type when setting assigned_to
uberbrady Oct 7, 2024
b99a26e
Add new tests for assigned_to without assigned_type
uberbrady Oct 7, 2024
b07609b
Added tighter validation to assigned_to and assigned_type, new tests
uberbrady Oct 10, 2024
858d60d
Fixed wrong comment
uberbrady Oct 10, 2024
6f6cbdf
Merge branch 'protect_assigned_to_assigned_type' of github.com:uberbr…
uberbrady Dec 2, 2024
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
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3217,6 +3217,24 @@
"contributions": [
"bug"
]
},
{
"login": "DarrenRainey",
"name": "Darren Rainey",
"avatar_url": "https://avatars.githubusercontent.com/u/6136439?v=4",
"profile": "https://darrenraineys.co.uk",
"contributions": [
"code"
]
},
{
"login": "maciej-poleszczyk",
"name": "maciej-poleszczyk",
"avatar_url": "https://avatars.githubusercontent.com/u/133033121?v=4",
"profile": "https://github.com/maciej-poleszczyk",
"contributions": [
"code"
]
}
]
}
2 changes: 2 additions & 0 deletions .env.testing.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null

[email protected]
5 changes: 4 additions & 1 deletion .github/workflows/tests-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
cp -v .env.testing.example .env
cp -v .env.testing.example .env.testing

- name: Create database file
run: touch database/database.sqlite

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

Expand All @@ -57,5 +60,5 @@ jobs:

- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite_testing
DB_CONNECTION: sqlite
run: php artisan test
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/47315739?v=4" width="110px;"/><br /><sub>bilias</sub>](https://github.com/bilias)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bilias "Code") | [<img src="https://avatars.githubusercontent.com/u/2565989?v=4" width="110px;"/><br /><sub>coach1988</sub>](https://github.com/coach1988)<br />[💻](https://github.com/snipe/snipe-it/commits?author=coach1988 "Code") | [<img src="https://avatars.githubusercontent.com/u/11910225?v=4" width="110px;"/><br /><sub>MrM</sub>](https://github.com/mauro-miatello)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mauro-miatello "Code") | [<img src="https://avatars.githubusercontent.com/u/60405354?v=4" width="110px;"/><br /><sub>koiakoia</sub>](https://github.com/koiakoia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=koiakoia "Code") | [<img src="https://avatars.githubusercontent.com/u/5323832?v=4" width="110px;"/><br /><sub>Mustafa Online</sub>](https://github.com/mustafa-online)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mustafa-online "Code") | [<img src="https://avatars.githubusercontent.com/u/104601439?v=4" width="110px;"/><br /><sub>franceslui</sub>](https://github.com/franceslui)<br />[💻](https://github.com/snipe/snipe-it/commits?author=franceslui "Code") | [<img src="https://avatars.githubusercontent.com/u/125313163?v=4" width="110px;"/><br /><sub>Q4kK</sub>](https://github.com/Q4kK)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Q4kK "Code") |
| [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") | [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") |
| [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") | [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") |
| [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") | [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") |
| [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") | [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
60 changes: 42 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![snipe-it-by-grok](https://github.com/snipe/snipe-it/assets/197404/b515673b-c7c8-4d9a-80f5-9fa58829a602)

[![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://app.codacy.com/gh/snipe/snipe-it/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Tests](https://github.com/snipe/snipe-it/actions/workflows/tests.yml/badge.svg)](https://github.com/snipe/snipe-it/actions/workflows/tests.yml)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://app.codacy.com/gh/snipe/snipe-it/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Tests](https://github.com/snipe/snipe-it/actions/workflows/tests.yml/badge.svg)](https://github.com/snipe/snipe-it/actions/workflows/tests.yml)
[![All Contributors](https://img.shields.io/badge/all_contributors-331-orange.svg?style=flat-square)](#contributing) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk)

## Snipe-IT - Open Source Asset Management System
Expand All @@ -14,6 +14,21 @@ Snipe-IT is actively developed and we [release quite frequently](https://github.
> [!TIP]
> __This is web-based software__. This means there is no executable file (aka no .exe files), and it must be run on a web server and accessed through a web browser. It runs on any Mac OSX, any flavor of Linux, as well as Windows, and we have a [Docker image](https://snipe-it.readme.io/docs/docker) available if that's what you're into.

-----

### Table of Contents
* [Installation](#installation)
* [User's Manual](#users-manual)
* [Bug Reports & Feature Requests](#bug-reports--feature-requests)
* [Security](#security)
* [Upgrading](#upgrading)
* [Translations!](#translations-)
* [Libraries, Modules & Related Projects](#libraries-modules--related-projects)
* [Join the Community!](#join-the-community)
* [Contributing](#contributing)
* [Announcement List](#announcement-list)


-----

### Installation
Expand All @@ -22,8 +37,6 @@ For instructions on installing and configuring Snipe-IT on your server, check ou

If you're having trouble with the installation, please check the [Common Issues](https://snipe-it.readme.io/docs/common-issues) and [Getting Help](https://snipe-it.readme.io/docs/getting-help) documentation, and search this repository's open *and* closed issues for help.

<!-- [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) -->

-----
### User's Manual
For help using Snipe-IT, check out the [user's manual](https://snipe-it.readme.io/docs/overview).
Expand All @@ -35,20 +48,21 @@ Feel free to check out the [GitHub Issues for this project](https://github.com/s

> [!IMPORTANT]
> **PLEASE see the [Getting Help Guidelines](https://snipe-it.readme.io/docs/getting-help) and [Common Issues](https://snipe-it.readme.io/docs/common-issues) before opening a ticket, and be sure to complete all of the questions in the Github Issue template to help us to help you as quickly as possible.**
>

-----

### Upgrading
### Security

Please see the [upgrading documentation](https://snipe-it.readme.io/docs/upgrading) for instructions on upgrading Snipe-IT.
> [!IMPORTANT]
> **To report a security vulnerability, please email [email protected] instead of using the issue tracker.**
-----

------
### Announcement List

To be notified of important news (such as new releases, security advisories, etc), [sign up for our list](http://eepurl.com/XyZKz). We'll never sell or give away your info, and we'll only email you when it's important.
### Upgrading

------
Please see the [upgrading documentation](https://snipe-it.readme.io/docs/upgrading) for instructions on upgrading Snipe-IT.

------
### Translations!

Please see the [translations documentation](https://snipe-it.readme.io/docs/translations) for information about available languages and how to add translations to Snipe-IT.
Expand Down Expand Up @@ -82,23 +96,33 @@ Since the release of the JSON REST API, several third-party developers have been

-----

### Join the Community!

- **[Join our Discord](https://discord.gg/yZFtShAcKk)!** It’s full of great people. We even wrote about it [here](https://grokstar.dev/culture/2024/06/the-unlikely-rise-of-discord-as-a-support-channel/)!
- **Follow us on Bluesky** at [@snipeitapp.com](https://bsky.app/profile/snipeitapp.com)
- **Follow us on Mastodon** at [hachyderm.io/@grokability](https://hachyderm.io/@grokability)
- **Follow our blog** at [Grokstar.Dev](https://grokstar.dev)
- **Subscribe here** on Github for notifications about new releases. (We recommend selecting "Releases" only for mosrt users - this repo can get noisy.)

-----

### Contributing

Please refrain from submitting issues or pull requests generated by fully-automated tools. Maintainers reserve the right, at their sole discretion, to close such submissions and to block any account responsible for them.
**Please refrain from submitting issues or pull requests generated by fully-automated tools. Maintainers reserve the right, at their sole discretion, to close such submissions and to block any account responsible for them.**

Ideally, contributions should follow from a human-to-human discussion in the form of an issue.
Contributions should follow from a human-to-human discussion in the form of an issue for the best chances of being merged into the core project. (Sometimes we might already be working on that feature, sometimes we've decided against )

Please see the complete documentation on [contributing and developing for Snipe-IT](https://snipe-it.readme.io/docs/contributing-overview).

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
This project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

The ERD is available [online here](https://drawsql.app/templates/snipe-it).

[Here is a list](CONTRIBUTORS.md) of the wonderful people that have contributed to the Snipe-IT.
Be sure to check out all of the [amazing people](CONTRIBUTORS.md) that have contributed to Snipe-IT over the years!

-----
------
### Announcement List

To be notified of important news (such as new releases, security advisories, etc), [sign up for our list](http://eepurl.com/XyZKz). We'll never sell or give away your info, and we'll only email you when it's important.

### Security

> [!IMPORTANT]
> **To report a security vulnerability, please email [email protected] instead of using the issue tracker.**
36 changes: 23 additions & 13 deletions app/Console/Commands/LdapSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Console\Commands;

use App\Models\Asset;
use App\Models\Department;
use App\Models\Group;
use Illuminate\Console\Command;
Expand Down Expand Up @@ -322,22 +323,29 @@ public function handle()
]
];
}


$add_manager_to_cache = true;
if ($ldap_manager["count"] > 0) {

// Get the Manager's username
// PHP LDAP returns every LDAP attribute as an array, and 90% of the time it's an array of just one item. But, hey, it's an array.
$ldapManagerUsername = $ldap_manager[0][$ldap_map["username"]][0];

// Get User from Manager username.
$ldap_manager = User::where('username', $ldapManagerUsername)->first();

if ($ldap_manager && isset($ldap_manager->id)) {
// Link user to manager id.
$user->manager_id = $ldap_manager->id;
try {
// Get the Manager's username
// PHP LDAP returns every LDAP attribute as an array, and 90% of the time it's an array of just one item. But, hey, it's an array.
$ldapManagerUsername = $ldap_manager[0][$ldap_map["username"]][0];

// Get User from Manager username.
$ldap_manager = User::where('username', $ldapManagerUsername)->first();

if ($ldap_manager && isset($ldap_manager->id)) {
// Link user to manager id.
$user->manager_id = $ldap_manager->id;
}
} catch (\Exception $e) {
$add_manager_to_cache = false;
\Log::warning('Handling ldap manager ' . $item['manager'] . ' caused an exception: ' . $e->getMessage() . '. Continuing synchronization.');
}
}
$manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed'
if ($add_manager_to_cache) {
$manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed'
}

}
}
Expand Down Expand Up @@ -418,6 +426,8 @@ public function handle()
if ($item['createorupdate'] === 'created' && $ldap_default_group) {
$user->groups()->attach($ldap_default_group);
}
//updates assets location based on user's location
Asset::where('assigned_to', '=', $user->id)->update(['location_id' => $user->location_id]);

} else {
foreach ($user->getErrors()->getMessages() as $key => $err) {
Expand Down
Loading
Loading