Commit Graph

109 Commits

Author SHA1 Message Date
boteroTradebe cc234c60b8 Update LdapSync.php to populate/update user fields
Added missing IF statements for address, city, state, and ZIP code. Previously, this information would be pulled via LDAP sync but would not update the user data due to the missing IF statements for these attributes.
2025-10-13 13:42:11 -05:00
snipe 4a6520fc78 Fixed address field
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 13:30:07 +01:00
snipe 07dbc6842c Are you KIDDING ME, Github??
This reverts commit c8e79aa5ca, reversing
changes made to e60f2b2332.

Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:56:28 +01:00
snipe 6503f9c667 Revert "Merge pull request #17650 from grokability/add-displayName-to-users"
This reverts commit 4770e469b4, reversing
changes made to 29a18c7c8b.

Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 20:23:47 +01:00
snipe fc091c1174 Added comments
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 09:29:12 +01:00
snipe c07ef4d87f A few small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 09:25:42 +01:00
snipe 1b42abcc98 Fixed mapping
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 19:54:32 +01:00
snipe 8b83584b67 Added mapping fields to LDAP
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:31:58 +01:00
snipe 549da2efed Set location ID to null instead of 0
Signed-off-by: snipe <snipe@snipe.net>
2025-07-02 17:15:18 +01:00
snipe 6f847294ed Merge pull request #15911 from Fiala06/patch-1
Fixed duplicate entries preventing LDAP sync from continuing
2025-03-04 12:49:54 +00:00
James M 112112d258 Feat: #14926 LDAP Active Flag - Add config option to make False = Enable 2025-02-27 10:52:12 -07:00
Joakim Bergros 5c66334017 Added a check to see if the user has specified that is an ActiveDirectory server in the configuration before adding the useraccountcontrol attribute to the ldap query. 2025-02-25 14:22:22 +01:00
Joakim Bergros ae82051b73 Fixed #16173: useraccountcontrol was not included in the ldap query attributes.
`$results` did not include the `useraccountcontrol` and thus rendered the fallback logic void when `active_flag` was blank.

 Added a condition to check if `active_flag` is blank and only then add `useraccountcontrol` to the ldap query since it is then a requirement in accordance with "we respect the userAccountControl attribute" text in the `admin/ldap` route.

[`elseif' will become true when `active_flag` is blank](https://github.com/snipe/snipe-it/blob/b141945add94eb0839436278a5b2dc2e0e116306/app/Console/Commands/LdapSync.php#L364)
2025-02-25 13:55:53 +01:00
Brady Wetherington 049b9c542b Conditionally update assets when user's location moves via LDAP 2025-01-09 13:43:59 +00:00
Brady Wetherington b5c8251539 Only update asset locations to assets checked out to users. 2024-12-09 17:40:10 +00:00
Fiala06 bdb0e6c2a3 Update LdapSync.php
Fix for duplicate entries preventing the sync from continuing. 

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '13178-6' for key 'PRIMARY' (Connection: mysql, SQL: insert into users_groups (group_id, user_id) values (6, 13178))
2024-12-02 11:07:37 -08:00
snipe 364410a586 Merge pull request #15558 from maciej-poleszczyk/develop
Fixing #15064 - to not fail ldap sync on single data issue with ldap …
2024-11-14 11:06:18 +00:00
snipe 787340b987 Merge pull request #14441 from Godmartinz/ldap_location-resync
Fixes Assets location not being resynced when Users location is updated via LDAP
2024-11-12 22:35:11 +00:00
Brady Wetherington e4e1d0d50a Clean up how we use the '$location' in LDAP sync command 2024-10-15 17:26:31 +01:00
Maciej Poleszczyk d1e2f9db34 Fixing #15064 - to not fail ldap sync on single data issue with ldap manager 2024-09-25 17:56:49 +02:00
setpill 4facc4007e feat: Explicitly request LDAP attributes during sync 2024-09-13 17:05:48 +02:00
setpill 31da47e046 refactor: Put LDAP attribute mapping in array 2024-09-13 17:05:28 +02:00
snipe ab6b8f520e Fixed field name
Signed-off-by: snipe <snipe@snipe.net>
2024-07-13 15:25:37 +01:00
snipe 24e58d1455 Do not update users who already exist since that locale may have been overirrden manually
Signed-off-by: snipe <snipe@snipe.net>
2024-07-13 15:20:04 +01:00
snipe f91ad6b2db Use app()->getLocale() to determine imported user’s language
Signed-off-by: snipe <snipe@snipe.net>
2024-07-13 15:15:44 +01:00
snipe fb233c0aa4 Cleaned up facade names and references
Signed-off-by: snipe <snipe@snipe.net>
2024-05-29 12:38:15 +01:00
Godfrey M d548b800d5 nullifies location after ldap user sync 2024-04-04 15:43:33 -07:00
Godfrey M c62a022252 replaced for loop with eloquent query update 2024-03-21 14:34:47 -07:00
Godfrey M 866f0a9f56 syncs assets location to users location 2024-03-19 11:58:49 -07:00
Godfrey M 05a8d3030b correct column name 2024-03-16 19:54:48 -07:00
Godfrey M 595dad0f18 updates all assets assigned to user with new location 2024-03-16 19:51:40 -07:00
Brady Wetherington 3bc1b9038d Fix for LDAP syncing with base_dn and location_id and location 2024-01-24 11:54:29 +00:00
snipe 5df6575c37 Fixed undefinted $search_base
Signed-off-by: snipe <snipe@snipe.net>
2023-12-14 00:11:02 +00:00
Godfrey Martinez 5569c2ba4a Merge branch 'develop' into ldap_sync_bug 2023-11-16 10:02:56 -08:00
Godfrey M 2f12a9cfe2 add a conditional around location_id to fix bug 2023-11-16 09:52:44 -08:00
Godfrey M 3b6a0d6525 allows multi location sync for ldap 2023-11-02 16:50:19 -07:00
Godfrey M 13d3f85c62 fixes ldap location sync 2023-11-01 12:26:58 -07:00
snipe 23fa92f4ce Check that the location is valid before debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-10-16 23:13:38 +01:00
snipe 2166d6649d Merge pull request #13343 from snipe/fixes/re-scramble_password_if_ldap_pw_sync_not_enabled
Fixed #13336 - Save unhashed password if no password provided
2023-09-14 14:15:53 +01:00
Godfrey M d1efca2ae1 fixes conflicts 2023-08-15 09:28:42 -07:00
Brady Wetherington 0af205dade Put guard around assigning location via LDAP 2023-08-02 15:01:14 +01:00
Godfrey M 8a24a47475 removed unnecessary code 2023-08-01 09:45:48 -07:00
Godfrey M fb52038e7c applies a check if a sync field is designated 2023-08-01 09:39:58 -07:00
snipe b54e7dc3ee Fixed #13336 - Save unhashed password if no password provided
Signed-off-by: snipe <snipe@snipe.net>
2023-07-19 17:44:40 +01:00
Brady Wetherington 051830dff4 Fix to ldap_location attribute 2023-07-17 20:42:02 +01:00
Godfrey M cb68f41d9c added ldap_location to settings 2023-04-25 11:44:04 -07:00
snipe 219d92dcfb The sea, Brady.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:00:30 -08:00
snipe 1651dbb68d Use null coalescing operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:00 -08:00
snipe 0cfeab8c50 Added an exit for the LDAP disabled sync short-circuit
Signed-off-by: snipe <snipe@snipe.net>
2023-02-01 16:46:58 -08:00
snipe 67e6089805 Short circuit the LDAP sync is LDAP is disabled
Signed-off-by: snipe <snipe@snipe.net>
2023-02-01 16:36:30 -08:00