Commit Graph

108 Commits (71759bf856f5b419ee248729bbbba0b5fb80dc87)

Author SHA1 Message Date
Côme Chilliet 36d756ab0f fix(user_ldap): Check that all user and group bases are in the global one
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-25 22:18:18 +07:00
Côme Chilliet 0d35a3df02 fix(user_ldap): Add missing use in ajax endpoint and fix L10N injection
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-25 22:18:18 +07:00
Côme Chilliet 7629d4df17 feat(user_ldap): Improve error detail when saving an incorrect configuration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-25 22:18:18 +07:00
Côme Chilliet 64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +07:00
Arthur Schiwon 0815aa0591
fix(LDAP): also log why the connection to main server failed
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-01-24 18:55:10 +07:00
provokateurin 381077028a
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
John Molakvoæ (skjnldsv) 26abc86eca
feat: add profile pronouns
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2024-09-17 22:20:36 +07:00
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Andy Scherzinger 8d8891c5bc
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-30 15:49:33 +07:00
Jake Nabasny f863290572
feat(ldap): sync additional properties to profile and SAB
Synced from LDAP to profile:
- Date of birth

Synced from LDAP to SAB (via the profile):
- Biography
- Date of birth

Original code by Jake Nabasny (GitHub: @slapcat)

Co-authored-by: Jake Nabasny <jake@nabasny.com>
Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-05-30 12:01:13 +07:00
Côme Chilliet 7f3fcbc49f
fix(user_ldap): Improve typing and fix a var name
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:59 +07:00
Côme Chilliet 672923f0a6
fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:58 +07:00
Côme Chilliet 6d7ff2e85a
fix: Fix typing issues related to resource migration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:48:27 +07:00
Côme Chilliet 72a0da6d4e fix: Fix small psalm errors in FTP and LDAP connections
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:01:47 +07:00
Côme Chilliet d4229f9f59 fix(user_ldap): Fix tests using wrong types
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:01:47 +07:00
Côme Chilliet 0f348516d2 fix: Remove obsolete resource typing
In PHP>=8.1, LDAP and FTP resources are always typed objects

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:01:47 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Arthur Schiwon d6b356c63b enh(LDAP): implement IIsAdmin interface
- add configuration to specify one LDAP group acting as admin group (CLI)
- implement `isAdmin()` method, basically relying on inGroup against the
  configured group

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-12-01 12:48:24 +07:00
Arthur Schiwon cb3faad5b5
fix(ldap): store last known user groups
- for LDAP user life cycle management

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-10-09 19:46:27 +07:00
Côme Chilliet b2f01b72fe
Merge pull request #34443 from nextcloud/feat/add-enabled-user-backend
Add IProvideEnabledStateBackend interface
2023-07-03 10:19:32 +07:00
Faraz Samapoor b0938b9083 Refactors "strpos" calls in /apps/user_ldap to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-02 15:26:55 +07:00
Côme Chilliet 50ccfb4f5b
[user_ldap] Add per-connection setting for marking remnants as disabled
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 16:03:17 +07:00
Marc Hefter 5ea46d81bb
nice up the code handling AccountManager
merging defaultScopes from DEFAULT_SCOPES and account_manager.default_property_scope
removing unneccessary profileScope setting (using config.php instead)
honoring admin choice 'profile.enabled'=>false in config.php
moved checking for empty array to updateProfile function
corrected some typos and cleaned some comments

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:30 +07:00
Marc Hefter dd2bd6a925
refined code, to be independend from OCP\IUser
rework updateProfile in user_ldap/lib/User/User.php
some cleanup at processAttributes in user_ldap/lib/User/User.php
rearranged Fediverse attribute, to match profile layout

Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:29 +07:00
Marc Hefter f812b87576
handling updateProfile with array of values
using an array to buffer profile updates, like suggested by @come-nc
clean some code and remove unneccessary redundancy
added the Fediverse profile property

Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:28 +07:00
Marc Hefter eee0275dc5
added user profile scope setting
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:22 +07:00
Marc Hefter 7fa3c674de
feature addition: [user_ldap] update user profile from LDAP; WIP; fixing some uggly copy-and-paste errors; testing functionality; preparing and editing the documentation
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:20 +07:00
Marc Hefter 404d26aa4a
feature addition: [user_ldap] update user profile from LDAP; WIP work-in-progress; TODO update profile
Signed-off-by: Marc Hefter <marchefter@march42.net>
2023-04-06 08:19:39 +07:00
Côme Chilliet 1ac2c74830
Apply a longer TTL of 15min to falling back on backup server
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-20 12:01:25 +07:00
Côme Chilliet 6b7ffcd6a8
Fixed backup host logic
Now forcing backup host applies to both main and background.
And background will fallback to backup if not responding.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 14:15:48 +07:00
Côme Chilliet 406750552e
Make code clearer for background host
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 14:15:48 +07:00
Côme Chilliet 4758bdc476
Use a dedicated LDAP host and port for background jobs if configured
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 14:15:46 +07:00
Côme Chilliet f7cd7047a2
Merge pull request #24574 from zenlord/ldapi-unix-socket-support
Ldapi unix socket support
2022-12-08 17:25:00 +07:00
blizzz b16c9838c6
Merge pull request #35355 from nextcloud/artonge/feat/ldap_connection_timeout
Allow to set a custom timeout for ldap connections
2022-11-30 14:44:15 +07:00
Louis Chemineau a781ae3afb Allow to set a custom timeout for ldap connections
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-11-23 11:37:49 +07:00
Côme Chilliet 90165309e1
Improve a bit codestyle
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-22 16:57:24 +07:00
Côme Chilliet 4893501abe
Log as warning instead of info when main LDAP server is unreachable
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-21 10:31:24 +07:00
Côme Chilliet 3e15ea6cd0
Log switching to LDAP backup host because main one is not available
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-17 14:58:44 +07:00
Vincent Van Houtte c323022d06 Add ldap-unix-socket support - squashed commits to files Connection.php, Configuration.php, Wizard.php, LDAP.php and view.js
Signed-off-by: Vincent Van Houtte <vvh@aplusv.be>
2022-09-09 16:53:05 +07:00
Carl Schwan 95b5187300 Don't use slow hashing to check the LDAP binding
Using password_hash is expensive and should be used for hashing
passwords when saving them in the database. Here we just want to see if
the bind was already done with the given password, so use a fast hashing
algorythm.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-05 16:29:38 +07:00
Côme Chilliet dab5ea958a
Fix unit tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-03 16:35:06 +07:00
Côme Chilliet 0c5bd588ed
Fix types in OCA\User_LDAP\Configuration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-03 11:53:50 +07:00
Côme Chilliet 2a0b2250d2
Improve typing in OCA\User_LDAP\Access and reduce psalm errors
This should avoid some PHP warning using PHP 8.1
 and help detecting type trouble early in the future.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-08 14:21:16 +07:00
Côme Chilliet f3dcbfe146
Fix PHP 8.1 support for user_ldap application
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:30 +07:00
Côme Chilliet f9e6f2ea57
Use Psr\Log\LoggerInterface where it can easily be used in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-14 14:12:03 +07:00
Daniel Kesselberg 33801708d2
Add return type for writeToCache
writeToCache does not return a string.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-06-15 17:03:03 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Arthur Schiwon 5ad08c7c84
do not die after LDAP auth failed with expired acc
- some servers return error code 53

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-03-01 19:20:05 +07:00