Arthur Schiwon
64fe042b0d
tidy up Group_LDAP
* remove unused method
* resolve code duplication
* remove usage of deprectad Util::writeLog
* phpDoc updates
* signature updates
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Christoph Wurst
734c62bee0
Format code according to PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Arthur Schiwon
38a8306e32
treat LDAP error 50 as auth issue, prevents lost server connection errors
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Arthur Schiwon
c6c8a41d2f
group display name support (service level + ldap)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Arthur Schiwon
5dd2207c95
fix nested group retrieval also for 2 other cases
and also consolidate logic in one method
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Arthur Schiwon
792bcb82ae
add LDAP ConfigHandler for external storages and "$home" var
* handler registered upon OCA\\Files_External::loadAdditionalBackends
event as user_ldap is loaded before files_external
* new configuration field "ldapExtStorageHomeAttribute" (not in GUI yet)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Arthur Schiwon
2048872f9e
functions that were checked for are present since PHP 5.4, supported is >=/
* so the check from older days is really not necessary anymore
* resolves #10923
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 years ago
Julius Härtl
c2616df541
Only bind if configuration for the first server is available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
8 years ago
Arthur Schiwon
343036e55c
allow admin to disable fetching of avatars as well as a specific attribute
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
cc51a00c93
lower log level for quota manipulation cases
and simplify the forest of ifs a little bit
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
7a728f2154
LDAP backup server should not be queried when auth fails
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Roger Szabo
8637b90e15
unbound cloned connection fix
Signed-off-by: Roger Szabo <roger.szabo@web.de>
8 years ago
Arthur Schiwon
38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
04f7252fc4
use hash algo that's robust against collisions
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
9bc75307e7
track the state of the bind result
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
c1e4f9f305
Use type casting instead of *val() method
It should be up to 6x faster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Arthur Schiwon
82fd09c294
don't show recurring msg when pages result was turned off
and only as debug level otherwise.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
5ce943aa85
don't use deprecated method for requesting memcache
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
59c05d5447
move LDAP user attributes "sync" to background (except for ajax jobs)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Arthur Schiwon
52b1b97c58
Fix regression: undesired writes to the DB
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Arthur Schiwon
3628d4d65d
avoid unnecessary recursion
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Arthur Schiwon
3e2015a24c
and add missing whitespaces to log outout
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
8 years ago
Jarkko Lehtoranta
69f6d42b17
LDAP: Simplify conditions in establishConnection
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
6103677a91
LDAP: Use imported exception in Connection class
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
79fbed4064
LDAP: Clean-up doConnect
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
d87375cbaa
LDAP: Throw an exception if disabling LDAP referrals fails
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
de9a9bc004
LDAP: Throw an exception if Start TLS fails
This ensures that only a secure connection to the LDAP server will be used,
if Start TLS has been enabled.
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
ee2c6e8215
LDAP: Remove unnecessary "recursion" fix
This reverts commit 86d72b9a61
"LDAP: fix possible recursion".
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
039a836d4a
LDAP: Don't handle invalid credentials as a connection error
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Jarkko Lehtoranta
4e2e592635
LDAP: Connect to backup server only if it exists + handle errors
Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
9 years ago
Xuanwo
8db21ad8c8
user_ldap: Add support for gidNumber
This patch is based on the work of @dleeuw (https://github.com/dleeuw )
(See https://github.com/nextcloud/server/issues/2640#issuecomment-269615883 for more details).
The difference is user & group data will be written into cache to have
better performance, and functions splited from primaryGroupID series to
make them more readable.
Fixed https://github.com/nextcloud/server/issues/2640
Signed-off-by: Xuanwo <xuanwo@yunify.com>
9 years ago
Arthur Schiwon
45615cc940
add integration test for uuid attr detection
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Brent Bloxam
f7b8a31d63
Update uuidAttributes list to include FreeIPA's ipauniqueid
Signed-off-by: Brent Bloxam <brent.bloxam@gmail.com>
9 years ago
Arthur Schiwon
7887566cff
remove frequent, unimportant log message
Fixes #2585
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Lukas Reschke
4c5e7d270a
Add tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
9 years ago
Victor Dubiniuk
011d5f554c
Harden empty
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
9 years ago
Roeland Jago Douma
bdf4bf4669
DI IConfig into ldap helper
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9 years ago
Roeland Jago Douma
013f691fe9
Fix phpdoc
10 years ago
Jörn Friedrich Dreyer
4d31caa6f8
fix a few minor code smells
10 years ago
root
02ec8b1726
New LDAPProvider for user_ldap
10 years ago
Joas Schilling
0215b004da
Update with robin
10 years ago
Joas Schilling
813f0a0f40
Fix apps/
10 years ago