Arthur Schiwon
33ac5fc640
do not forget DB table prefix with truncate query
...
- as used in LDAP's AbstractMapping::clear() method
- and in Comment's ManagerTest::setUp()
- fixes a DB Exception with Oracle
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-05-19 15:09:39 +02:00
Arthur Schiwon
3c91048ad4
be conservative when reading from fresh created column
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-03-21 14:04:20 +01:00
Arthur Schiwon
a5228a0c42
adjust backport to stable20
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:26 +01:00
Arthur Schiwon
2208ed6f67
fix code style
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:25 +01:00
Arthur Schiwon
c14dda9b44
fix use of executeQuery and -Statement
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:25 +01:00
Arthur Schiwon
bf31badac4
allow to re-run migration step when backup DB is already created
...
- to heal incomplete states from broken upgrades
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:24 +01:00
Arthur Schiwon
6813b38148
invalidated duplicated UUIDs prior to migration change
...
- in a proper setup there are no duplicated UUIDs
- not all setups are proper
- log warning to admin
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:24 +01:00
Côme Chilliet
d6b0ff4163
Functions executeQuery and executeStatement do not exists in 20
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-17 12:00:02 +01:00
Côme Chilliet
02e78231f9
Fix Types namespace for version 20
...
Use Doctrine\DBAL\Types\Types instead of OCP\DB\Types
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-17 10:34:52 +01:00
Côme Chilliet
e20548731f
Remove useless indexes with duplicated names on backup table
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:46:46 +00:00
Côme Chilliet
f2204af7b2
Fix user_ldap migration for long DNs support
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:46:44 +00:00
Côme Chilliet
85f5fe6dda
Move duplicated code to a base class for group_mapping migrations
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
2022-01-14 08:46:44 +00:00
Côme Chilliet
d6d5f3d2f3
Split dropTable and createTable in two migrations
...
It is not possible to drop and create the same table in one migration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:46:43 +00:00
Côme Chilliet
4b40402821
Fix primary key change in user_ldap migration
...
Use a backup table to copy the data, drop table and recreate it with
correct primary key, then copy the data back and drop the backup table.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:46:42 +00:00
Côme Chilliet
5a2b7fbc46
Adapt execute function name for stable21
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:51:53 +01:00
Côme Chilliet
e2d861313f
Add missing copyright headers in migration steps
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:51:01 +01:00
Côme Chilliet
e3d541bf32
Use clearer names for variables
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:55 +01:00
Côme Chilliet
a51e366b0a
Add an index for directory_uuid as well
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:49 +01:00
Côme Chilliet
2aa748b782
Add the columns and alter the index in Version1010Date20200630192842
...
This is to ensure new installations do not need to go through migration
history.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:35 +01:00
Côme Chilliet
0680271155
Fixes in migration step
...
We cannot set ldap_dn_hash column as notnull because it is empty for
existing users before postSchemaChange is called
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:23 +01:00
Côme Chilliet
e5c8ea4f5d
Fixed migration step for user_ldap
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:09 +01:00
Joas Schilling
462b421cdb
Fix variable names
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-14 16:50:02 +01:00
Côme Chilliet
2ca7f31cbf
Change column names to ldap_dn and ldap_dn_hash and add migration
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:49:55 +01:00
Côme Chilliet
3d8d4f8c1b
Support LDAP dns longer than 255 characters
...
Adds an ldap_full_dn column to store the dn, and only store a sha256
hash in the ldap_dn which is shorter and can be indexed without
trouble.
Migration still needs to be implemented.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:49:31 +01:00
blizzz
031c89ae52
adjust to old db interfaces
...
Co-authored-by: Daniel <mail@danielkesselberg.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-10-05 13:02:07 +02:00
Arthur Schiwon
e76211fdad
ensure that user and group IDs in LDAP's tables are also max 64chars
...
- limitation by core tables (e.g. sharing), IDs are always 64chars
- when longer group IDs were requested they are hashed (does not affect
displaynames)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-27 17:59:52 +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
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
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
Joas Schilling
556e23e681
Move user_ldap to migrations
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-06 16:42:14 +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
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
44577e4345
Remove trailing and in between spaces
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02: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
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
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
Arthur Schiwon
42ddb12fd9
Background jobs can take 4k of characters only. We find a good batch size.
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-02-17 20:06:25 +01:00
Arthur Schiwon
497ee3e3e6
Add repair steps
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-02-17 18:45:33 +01:00