Commit Graph

62 Commits

Author SHA1 Message Date
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Joas Schilling 8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
Arthur Schiwon c96a9a9001
fix insert values
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-06 13:30:19 +01:00
Joas Schilling c5b6e4bc09
Use query builder to interact with member management
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-06 11:28:53 +01:00
Joas Schilling 5fba0e562f
Use query builder instead of OC_DB in user_ldap
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-06 11:25:28 +01:00
Arthur Schiwon 3a51160221
fix potentially passing null to events where IUser is expected
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-30 16:30:01 +01:00
Arthur Schiwon fd44087530
adds unit test for updategroups background job
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-30 16:30:00 +01:00
Arthur Schiwon fd1fd5afa4
user share manager to determine share ownership
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-26 16:05:28 +01:00
Arthur Schiwon 86e5e7d927
LDAP simplify User_Proxy and Group_Proxy signatures
- make User_Proxy and Group_Proxy easy to instantiate
- simplify dependent code
- move commands to info.xml
- make UpdateGroups job class non-static

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-23 12:25:31 +02:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Arthur Schiwon 263f5bd1d9
switch to typed event for LDAPs user added to group case
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-09-10 12:57:10 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke 36ee37ec0a
Migrate OC_Group post_removeFromGroup hook to actual event object
Ref #14552

This adds a BeforeUserRemovedEvent to the LDAP backend because it was missing. It's not really before, but we don't have the before state.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-30 10:21:08 +02:00
Morris Jobke 3203286f52
Do not use custom DI object names for user_ldap
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-13 17:22:19 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +02:00
Christoph Wurst a7c8d26d31
Add visibility to all properties and move static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:48:31 +02:00
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Arthur Schiwon f990620e6b
make chunksize (used to check for gone LDAP users) configurable
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-20 19:43:53 +01:00
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
Arthur Schiwon f1565336bd
DI for NC's user manager
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-05 12:46:24 +02:00
Roeland Jago Douma f4fd0224db
Do not use \OCP\DB anymore
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-26 14:40:23 +02:00
Morris Jobke 236086c457
Merge pull request #8335 from nextcloud/remove-unused-import
Remove unused import statements
2018-02-14 22:23:07 +01:00
Morris Jobke d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-14 16:55:43 +01:00
Morris Jobke e2974f1133
Simplify return statement
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-13 21:55:24 +01:00
Morris Jobke 6bbea33133
Simplify ternary operator statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 12:36:25 +01:00
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>
2018-01-26 11:35:42 +01:00
Roeland Jago Douma 8a41d05761
Remove deprecated \OCP\Config
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-13 14:25:04 +01:00
Arthur Schiwon 9031ae0281
fix return value when ldapPagingSize returns null
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-11 14:47:51 +01:00
Arthur Schiwon f292f98060
when paged results are turned off, all (max possible) users are returned
thus hasMoreResult should return false

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-11 13:20:17 +01:00
Arthur Schiwon 7c3db54ff6
fix changing to next cycle
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-08 13:45:06 +01:00
Arthur Schiwon b17c5fec40
add unit test for qualifies to run
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-08 13:08:59 +01:00
Arthur Schiwon a565bf0b9f
fix offset is never being reset
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-05 14:29:11 +01:00
Arthur Schiwon 82da4fde18
create failing test for this case
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-05 14:27:36 +01:00
Arthur Schiwon 419759e68b
resolve DI
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:59 +01:00
Arthur Schiwon 8113f26eed
add Sync test
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:58 +01:00
Arthur Schiwon 59c05d5447
move LDAP user attributes "sync" to background (except for ajax jobs)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:56 +01:00
Arthur Schiwon ef3cd32916
don't skip updating when ajax is set as background job mode
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:04 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Vinicius Cubas Brand 10ca793452 Plugins infrastructure in User_LDAP
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2017-11-03 11:41:40 -02:00
Arthur Schiwon c9622ccb62
fix LDAP User deletion (cleanup)
discovered a bug in the integration test which lead to following a
different code path and giving a false-positive  success feedback.

Also listens now to the evendispatcher instead of old hook system

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-29 11:44:04 +02:00
Roger Szabo 5e7723f15c restore ldap_password_renew_pr
Signed-off-by: Roger Szabo <roger.szabo@web.de>
2017-03-31 15:16:22 +08:00
Roeland Jago Douma bdf4bf4669
DI IConfig into ldap helper
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-10 10:18:18 +02:00
Joas Schilling 01cf85e4e5
Fix the User_LDAP app 2016-09-12 16:48:11 +02:00