Commit Graph

887 Commits

Author SHA1 Message Date
Arthur Schiwon 4dc4b7617b do not try to search after the last page
- saves an LDAP requests in these cases
- prevents a Protocol Error logged on < 7.3 API (for backports)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-27 17:39:53 +00:00
Joas Schilling e9ea4a0f01 Fix parameter types in docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-22 20:07:53 +01:00
Arthur Schiwon 4cd15b7815 adds ldap user:reset command
- allows to delete data of existing LDAP users, which otherwise is safe
  guarded
- ensures that the user is not being deleted on LDAP through a plugin

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-03-17 13:38:55 +00:00
Roeland Jago Douma 3922966f3c
Merge pull request #25843 from nextcloud/backport/25757/stable21
[stable21] fix detecting cyclic group memberships
2021-03-03 11:34:25 +01:00
Arthur Schiwon 9d937489db 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-02 20:40:02 +00:00
Arthur Schiwon 81fcc0a618 fix detecting cyclic group memberships
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-03-01 11:10:31 +00:00
Christoph Wurst 6a3321cefe
Merge pull request #25101 from nextcloud/fix/noid/ldap-known-groups
LDAP: make actually use of batch read known groups
2021-01-29 10:57:31 +01:00
Arthur Schiwon 90d82b03ef
fix parameter provided as string not array
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-28 15:15:55 +01:00
blizzz 939433363e
Merge pull request #25128 from nextcloud/ldapprovider-get-property
extend ILDAPProvider to allow reading arbitrairy ldap attributes for users
2021-01-22 14:31:19 +01:00
Arthur Schiwon ef0a3a92f4
silence log message
- this appears too often (in some configurations) when qualifying group
members which do not meet the criteria

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-21 17:25:44 +01:00
Robin Appelman fdc8635afb
extend ILDAPProvider to allow reading arbitrairy ldap attributes for users
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-19 16:33:58 +01:00
blizzz f9ab7575e7
Merge pull request #25036 from nextcloud/fix/noid/limitied-allowed-items-db-in_2
respect DB restrictions on number of arguments in statements and queries
2021-01-14 11:36:42 +01:00
Arthur Schiwon 21ca5d4514
silence psalm false positive
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-13 11:54:29 +01:00
Arthur Schiwon 02b703193a
really use known groups
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-12 20:52:52 +01:00
Christoph Wurst c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-12 14:09:13 +01:00
Arthur Schiwon 45e3261ad5
respect DB limits limit per statement and query
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-11 13:43:34 +01:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +01:00
Roeland Jago Douma dc89447f13
Revert "(LDAP) respect DB limits of arguments in an IN statement" 2021-01-08 10:44:32 +01:00
Arthur Schiwon 6eca8d6ae1
respect DB limits of arguments in a IN list
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-01-07 20:16:40 +01:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
2020-12-22 09:53:31 +01:00
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
blizzz f68cab4e39
Merge pull request #24402 from nextcloud/fix/24252/ldap-ingroup-memberid
LDAP: fix inGroup for memberUid type of group memberships
2020-12-15 22:33:41 +01:00
Arthur Schiwon 270912848f
check number of members after potential resolving of rdns
- the type check is not necessary anymore for the return type of
  _groupMembers()

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-27 18:44:27 +01:00
Arthur Schiwon 1f40ecca86
use faster and less hungry foreach
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-27 18:38:08 +01:00
Christoph Wurst 334f3943ab
Migrate LDAP's install.php to a repair step
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-27 15:13:01 +01:00
Tobias Perschon 594370e2f2 moved the array_reduce to fix large search case
also added some additional comments and renamed some vars to make it intuitive whats in them

Signed-off-by: Tobias Perschon <tobias@perschon.at>
2020-11-27 11:12:14 +01:00
Arthur Schiwon 57bfe0d1f9
flatten result array as expected by following code
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-26 23:36:04 +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
Arthur Schiwon 4104416e81
only delete specified config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-11-06 13:01:37 +01:00
Joas Schilling 8547934e20
Correctly place the array type 2020-11-06 12:09:58 +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
Morris Jobke 0053ec82ac
Document the backend registered events of LDAP
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-29 09:18:46 +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 951887e922
fixes determining whether former user is a share owner
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-26 16:05:28 +01:00
Arthur Schiwon 2e455f632a
split instantiation from business logic in OfflineUser
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
Arthur Schiwon 2ee26b691c
tame psalm. why does it ignore '@property'?
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-19 13:44:32 +02:00
Arthur Schiwon d741c5ab30
when nesting is not enabled, the group filter can be applied right away
- helps performance, but skipping unnecessary entries
- reduces reoccuring info-level log output against groups that do not
  qualify ("no or empty name")

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-19 13:44:32 +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
J0WI 68ce17e59b Unify links to php.net
Update all links to https://www.php.net/

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:40:04 +02:00
Arthur Schiwon b95e63b8da
announce added user and group backend later as there might be interdeps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-09-11 00:14:06 +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 1f7f93a695
Update license headers for Nextcloud 20 (again)
There are still lots of outdated headers, so time for another round of
updates.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +02:00
Arthur Schiwon aa2d754d5c
add repair step to clean up DB off lastFeatureRefresh entries in user prefs
- also removes related app setting "updateAttributesInterval"

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-09-04 12:59:57 +02:00
Arthur Schiwon 699871dcb0
these code bits were part of old logic that was already refactored out
- only references were in unit tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-09-04 12:56:43 +02:00