Commit Graph

2560 Commits

Author SHA1 Message Date
Nextcloud bot 514d92b7a8
[tx-robot] updated from transifex 2019-04-11 00:13:13 +00:00
Nextcloud bot 22599e2c58
[tx-robot] updated from transifex 2019-04-06 00:13:20 +00:00
Nextcloud bot bca4a9ecbb
[tx-robot] updated from transifex 2019-03-26 10:41:42 +00:00
Vinicius Cubas Brand 79b7f12a79 LDAP plugin: force createUser to return new user's DN
LDAP plugins must change the createUser method to return the DN, as we
need this to update the cache.

Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2019-03-21 10:33:04 +00:00
Vinicius Cubas Brand 7d6a7ab351 Cache cleaning when subadmin adds user to group
This commit fix an error happening when the subadmin tries to create an
user, adding him/her to the group s/he is subadmin of, using a LDAP
User/Group plugin.

This just forces the cache to be reset after an user is added to a
group.

Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2019-03-21 10:33:03 +00:00
Vinicius Cubas Brand 20b0817e5c fix user creation using LDAP Plugin
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2019-03-21 10:33:03 +00:00
Nextcloud bot 2c7f1fd001
[tx-robot] updated from transifex 2019-03-21 01:14:06 +00:00
Nextcloud bot d33cec3d7d
[tx-robot] updated from transifex 2019-03-16 01:12:43 +00:00
Nextcloud bot 92634ec842
[tx-robot] updated from transifex 2019-03-14 16:08:44 +00:00
Arthur Schiwon a358c4d81f
remove unused use statement
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-03-07 22:39:54 +01:00
Arthur Schiwon a6c0d53a3e
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>
2019-03-07 22:39:25 +01:00
Roland Tapken 3384e25154
Fixed unit test: groupsMatchFilter will not be called multiple times anymore.
Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2019-03-07 22:38:15 +01:00
Roland Tapken 0a469e8f23
Reduce queries to LDAP by caching nested groups
Nested groups are now cached in a CappedMemoryCache object to reduce
queries to the LDAP backend.

Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2019-03-07 22:37:21 +01:00
Roland Tapken 0997fd999e
user_ldap: really resolve nested groups
The previous patch fixed the problem only for one level of indirection
because groupsMatchFilter() had been applied on each recursive call (and
thus there would be no second level if the first level fails the check).

This new implementation replaces the recursive call with a stack that
iterates all nested groups before filtering with groupsMatchFilter().

Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2019-03-07 22:36:21 +01:00
Roland Tapken fe169b021d
user_ldap: Filter groups after nexted groups
Currently groupsMatchFilter is called before nested groups are resolved.
This basicly breaks this feature since it is not possible to inherit
membership in a group from another group.

Minimal example:

  Group filter: (&(objectClass=group),(cn=nextcloud))
  Nested groups: enabled

  cn=nextcloud,ou=Nextcloud,ou=groups,dn=company,dn=local
    objectClass: group

  cn=IT,ou=groups,dn=company,dn=local
    objectClass: group
    memberOf: cn=nextcloud,ou=Nextcloud,ou=groups,dn=company,dn=local

  cn=John Doe,ou=users,dn=company,dn=local
    objectClass: person
    memberOf: cn=IT,ou=groups,dn=company,dn=local

Since 'cn=IT,ou=groups,dn=company,dn=local' doesn't match the group
filter, John wouldn't be a member of group 'nextcloud'.

This patch fixes this by filtering the groups after all nested groups
have been collected. If nested groups is disabled the result will be the
same as without this patch.

Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2019-03-07 22:36:14 +01:00
Nextcloud bot 068b754d31
[tx-robot] updated from transifex 2019-03-01 01:12:48 +00:00
Nextcloud bot aac2669762
[tx-robot] updated from transifex 2019-02-28 01:12:49 +00:00
Nextcloud bot 192bb12d5b
[tx-robot] updated from transifex 2019-02-27 01:12:18 +00:00
Nextcloud bot 1985b88e84
[tx-robot] updated from transifex 2019-02-26 01:12:22 +00:00
Nextcloud bot a7b322bd65
[tx-robot] updated from transifex 2019-02-25 01:12:29 +00:00
Nextcloud bot b42e3fa1b3
[tx-robot] updated from transifex 2019-02-21 01:12:14 +00:00
Nextcloud bot 4a0feef83d
[tx-robot] updated from transifex 2019-02-19 01:12:20 +00:00
Nextcloud bot 84ab16bac4
[tx-robot] updated from transifex 2019-02-18 01:12:21 +00:00
Nextcloud bot 4651c25f17
[tx-robot] updated from transifex 2019-02-17 01:13:40 +00:00
Arthur Schiwon d34e021af0 ensure attribute names are lower cased
otherwise they will be skipped when the results is being formatted and the
lower-cased result keys do not match.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-02-14 14:08:27 +00:00
Nextcloud bot 262c5a6236
[tx-robot] updated from transifex 2019-02-14 01:12:38 +00:00
Nextcloud bot 8660fc3502
[tx-robot] updated from transifex 2019-02-08 01:12:50 +00:00
Nextcloud bot 3e72cc16e7
[tx-robot] updated from transifex 2019-02-06 11:27:41 +00:00
Arthur Schiwon 2b8a669d31 iterate over bases instead of doing parallel search
parallel search is not compatible with paged search, but the letter is
usually always applied.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-01-29 13:25:23 +00:00
Nextcloud bot fc0480282a
[tx-robot] updated from transifex 2019-01-26 01:12:28 +00:00
Nextcloud bot 3079a88f03
[tx-robot] updated from transifex 2019-01-24 01:12:16 +00:00
Nextcloud bot 34c1644714
[tx-robot] updated from transifex 2019-01-23 01:12:19 +00:00
Nextcloud bot 6a44943425
[tx-robot] updated from transifex 2019-01-16 01:12:46 +00:00
Nextcloud bot 08676fd8e6
[tx-robot] updated from transifex 2019-01-15 01:12:27 +00:00
Nextcloud bot 457261a955
[tx-robot] updated from transifex 2019-01-14 01:12:11 +00:00
Nextcloud bot 0fdb6b4545
[tx-robot] updated from transifex 2019-01-13 01:13:03 +00:00
Nextcloud bot a0d08147d9
[tx-robot] updated from transifex 2019-01-05 01:12:08 +00:00
Arthur Schiwon 03e75aea49 ensure db is pristine before starting the tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-01-04 21:48:42 +00:00
Arthur Schiwon bebec87880 LDAP: extend remnants output with "detected on" field
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-01-04 21:48:42 +00:00
Arthur Schiwon 55058adb2c add tests for the DUI
as they are interact with the DB they are more integraiton than unit tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-01-04 21:48:42 +00:00
Nextcloud bot 5270f3996f
[tx-robot] updated from transifex 2019-01-04 01:12:40 +00:00
Nextcloud bot 933d0c1902
[tx-robot] updated from transifex 2018-12-31 01:11:52 +00:00
Nextcloud bot 9e315b1ac4
[tx-robot] updated from transifex 2018-12-28 01:11:59 +00:00
Nextcloud bot 424fc68d4c
[tx-robot] updated from transifex 2018-12-27 01:11:51 +00:00
Nextcloud bot 23889c50fc
[tx-robot] updated from transifex 2018-12-24 01:11:59 +00:00
Arthur Schiwon c1e03e2a29 do not forgot to store the second displayname portion
otherwise it causes a chain reaction of system addressbook updates

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-12-21 13:44:01 +00:00
Nextcloud bot 140f3d2ee0
[tx-robot] updated from transifex 2018-12-19 01:11:56 +00:00
Nextcloud bot 81f1edd432
[tx-robot] updated from transifex 2018-12-18 01:11:44 +00:00
Arthur Schiwon a7a1be792c LDAP clear cache on config modification also when done via API or CLI
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-12-17 12:08:10 +00:00
Arthur Schiwon e3fd241aba cache users as existing after mapping
during login they might be cached as non-existing and cause an Exception
in the long run

reduces some duplication, too

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-12-17 12:08:10 +00:00