Arthur Schiwon
1408509ee7
Merge pull request #40918 from nextcloud/backport/40709/stable27
...
[stable27] LDAP: Increase profile picture limit to 512
2023-11-15 22:32:07 +01:00
Arthur Schiwon
369d99f513
fix(LDAP): prevent incomplete displaynames…
...
… when reading users from primary groups or gidNumber-based groups
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-11-09 19:48:59 +00:00
Arthur Schiwon
89a5fbff20
fix(LDAP): solve race condition reading groups of disappeared LDAP user
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-10-30 10:24:02 +01:00
Arthur Schiwon
27fc0a5dd1
refactor(LDAP): pass IConfig via constructor to Group_LDAP
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-10-30 10:24:02 +01:00
Arthur Schiwon
e178815b83
fix(ldap): store last known user groups
...
- for LDAP user life cycle management
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-10-30 10:24:02 +01:00
Marcel Klehr
c1283e134f
Update apps/user_ldap/lib/User/User.php
...
Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-10-14 14:43:57 +00:00
Marcel Klehr
90c6b883a2
LDAP: Increase profile picture limit to 512
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-10-14 14:43:57 +00:00
Côme Chilliet
e2d3fef5b4
Merge pull request #37201 from AaronDewes/fix/ldap-filter-generation
...
Fix: Escape group names for LDAP
2023-10-02 11:06:28 +02:00
Arthur Schiwon
00ac153ef7
fix(LDAP): add return type hint and description
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-09-11 17:53:16 +00:00
Arthur Schiwon
1f748ded7e
fix(ldap): avatar is not being fetched
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-09-11 17:53:16 +00:00
Anna Larch
1e6e722703
Do not log passwords in debug mode
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-08-24 13:03:37 +02:00
Côme Chilliet
d47e122180
Avoid adding (attribute=) part to filter which will confuse LDAP servers
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-08-08 07:40:19 +00:00
Côme Chilliet
c995428431
Merge pull request #37903 from nextcloud/fix/user_ldap-fix-multiple-ldap-support
...
Fix multiple LDAP configuration support by fixing AccessFactory
2023-05-02 17:11:01 +02:00
Côme Chilliet
b6c17c6ce7
Clear up return types
...
usersInGroup index by int for BC, searchInGroup index by uid (string).
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 12:00:45 +02:00
Côme Chilliet
6385a5af36
Let OC\Group\Group handle the fallback and remove default implementation from ABackend
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 12:00:43 +02:00
Carl Schwan
35dc223500
Optimize retrieving display name when searching for users in a group
...
This is recurrent scenario that we are searching for users and then for
each users we fetch the displayName. This is inefficient, so instead try
to do one query to fetch everything (e.g. Database backend) or use the
already existing DisplayNameCache helper.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-27 11:57:45 +02:00
Côme Chilliet
967955358c
Add comment about Manager instance not being shared
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 11:21:53 +02:00
Daniel
2abefff289
Merge pull request #36784 from nextcloud/fix/user_ldap-update-groups-fail-get
...
Properly test and log when a group is not found
2023-04-24 16:26:30 +02:00
Côme Chilliet
429db14a00
Fix multiple LDAP configuration support by fixing AccessFactory
...
It must not reuse the same OCA\User_LDAP\User\Manager instance for
several Access instances.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-24 16:03:40 +02:00
Marc Hefter
621c6c3c56
code styling
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
2023-04-24 10:21:45 +02:00
Marc Hefter
aa210365ec
Update apps/user_ldap/lib/User/User.php
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
2023-04-24 10:14:17 +02:00
Marc Hefter
e83520617d
removed profile data from LDAP will get removed
...
If attribute mapping is configured and no value present in LDAP, the
according profile field is emptied. Removing an attribute e.g. phone
from LDAP will cause the phone number being removed from profile.
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-21 10:35:44 +02:00
Simon L
93966e99c1
Merge pull request #36565 from march42/feature/ldap_update_profile
...
[user_ldap] Update profile from LDAP fields
2023-04-20 11:23:24 +02:00
Marc Hefter
64914593a0
optimized handling of user profile data change
...
Check profile data checksum before updating user profile, to ensure
data has changed. Write checksum to user settings and cache.
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-14 11:08:46 +02:00
Julien Veyssier
f3cd559c54
perform exact Ldap search as well to make sure it works for attributes without a substr matching rule
...
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2023-04-13 19:59:17 +00:00
Marc Hefter
eec5e702da
error handling in update profile from LDAP
...
added error message on InvalidArgumentException
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-11 16:40:00 +02:00
Marc Hefter
ebb0c53f9e
trying to make github-code-scanning bot happy
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:31 +02:00
Marc Hefter
72d0a3f26e
added simple data conversion for LDAP attributes
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:31 +02:00
Marc Hefter
1e7bc93ec8
handling, formatting of postalAddress attribute syntax
...
replace '$' with ', ' delimiter for address property
reformatted some code to 80 column
early check and return, if wasRefreshed('profile')
removed FIXMEs after digging and double checking
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:30 +02: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 +02: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 +02:00
Marc Hefter
c6408587ed
fixing Psalm messages
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:28 +02: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 +02:00
Marc Hefter
5c4a05cfd6
CleanUp: removed redundant storing profile attributes in user settings
...
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:27 +02:00
Marc Hefter
3020290751
CleanUp: removed redundant condition if block
...
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:27 +02:00
Marc Hefter
2f76b7a3d5
CleanUp: tidy checking for empty profileScope
...
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:26 +02:00
Marc Hefter
44065c0fea
Fix: Parameter $scope has no provided type
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:25 +02:00
Marc Hefter
26aa1c3580
CleanUp: remove unneeded UNSET, to unclutter code
...
Signed-off-by: march42 <marchefter@gmail.com>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:25 +02:00
Marc Hefter
240c57b94b
cleanup: removed unnecessary imports of IAccountManager, AccountManager, IDBConnection
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:24 +02:00
Marc Hefter
b72fbd58f6
fixed error: Array to string conversion at user_ldap/lib/User/User.php#639
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:23 +02:00
Marc Hefter
c7623c7869
bugfix: changed forgotten userName, to getUsername
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:22 +02: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 +02:00
Marc Hefter
2315c17726
feature addition: [user_ldap] update user profile from LDAP
...
Signed-off-by: Marc Hefter <marchefter@march42.net>
Signed-off-by: Marc Hefter <marchefter@gmail.com>
2023-04-06 08:20:21 +02: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 +02: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 +02:00
Arthur Schiwon
bd0f374cfd
Merge pull request #37575 from nextcloud/fix/user_ldap-log-suffix-names
...
Log a warning when a user or group is mapped with a suffix
2023-04-05 10:28:23 +02:00
jld3103
d9f8522003
Fix types for reading and writing config values
...
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-05 09:08:56 +02:00
Côme Chilliet
51705da7a4
Log a warning when a user or group is mapped with a suffix
...
Most of the time, this is the result of a misconfiguration by the admin
and is not what is expected.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-04 14:08:24 +02:00
Arthur Schiwon
17afaa488f
fix undefined method getExtStorageHome()
...
- adds a type check
- defines missing method in OfflineUser
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-03-22 13:54:27 +01:00
Arthur Schiwon
8f59ff880f
Merge pull request #37006 from nextcloud/ldap-unmark-dh
...
also unmark deleted ldap user when checking the ldap entry
2023-03-20 16:15:03 +01:00