Commit Graph

402 Commits (78b7baea9d5f80eaea522463243c25f4f908fcc5)

Author SHA1 Message Date
Joas Schilling 106d5f9c5c
Merge pull request #32196 from nextcloud/bugfix/noid/fix-strict-comparison
Fix strict comparison
2022-05-02 08:19:10 +07:00
Côme Chilliet b865722ac0
Remove deprecated occ app:check-code command
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-28 15:08:01 +07:00
Joas Schilling 60801d8b1c
Fix strict comparison
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-27 20:31:40 +07:00
Joas Schilling 2ffcc08332
Fix type fixing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-25 16:49:23 +07:00
Joas Schilling 7ee982005a
Give hints on correct migration versioning
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-25 16:21:25 +07:00
Julius Härtl 7fbd93b2ad
Additional index on oc_preferences to make sure that gettingh values without a user filter is fast
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-19 12:37:36 +07:00
Joas Schilling cfd2e8cc20
Allow to autocomplete user and group ids in commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-08 11:54:44 +07:00
blizzz 835e28d0b2
Merge pull request #31661 from nextcloud/enh/user_ldap-add-command-to-unmap-groups
Add ldap:reset-group command to unmap groups from LDAP
2022-04-05 10:57:33 +07:00
Christoph Wurst 498d3aea06
Merge pull request #31687 from nextcloud/enhancement/passwordless-app-passwords
Allow app passwords without login password for occ user:add-app-password
2022-04-04 11:46:17 +07:00
Côme Chilliet 77bdad84c2 Add ldap:reset-group command to unmap groups from LDAP
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-01 12:18:02 +07:00
Côme Chilliet 9191ca43ce
Merge pull request #31735 from nextcloud/fix/noid/mig-generator-copyright
migration generator also includes copyright section
2022-03-29 16:49:43 +07:00
Côme Chilliet 765999f454
Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +07:00
Arthur Schiwon ee006563ae
migration generator also includes copyright section
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-03-28 15:35:17 +07:00
Côme Chilliet ea23523c70
Adapt more code to migration to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +07:00
Louis Chemineau 970fb7ce65 Don't create cards_abiduri it if already exists
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-03-24 10:42:22 +07:00
Christoph Wurst 515235163c
Allow app passwords without login password for occ user:add-app-password
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-03-23 18:47:33 +07:00
Joas Schilling ab29a67a32
Allow creating app passwords without validating the user's password again
Aparently the idea behind the command was exactly to do this.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-14 13:30:59 +07:00
Joas Schilling db1c2a5375
Merge pull request #31511 from nextcloud/bugfix/noid/allow-installing-unstable-versions
Allow installing unstable app versions based on channel and with `--allow-unstable` just like on updates
2022-03-11 14:26:30 +07:00
Joas Schilling a4111d4846
Allow installing unstable versions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 16:10:25 +07:00
Joas Schilling 50ccf7e2cf
Validate the password before generating an apptoken
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 15:52:01 +07:00
Joas Schilling f98044ddce
Trigger an event to log an activity when an administrator generates an app password
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-10 15:25:22 +07:00
Christoph Wurst c1000fe344
Merge pull request #31304 from nextcloud/feature/dry_run_for_add_indices
Add --dry-run option for add-missing-* cmd
2022-02-28 09:59:40 +07:00
Louis Chemineau 405c5eb813 Add --dry-run option for db:add-missing-* cmd
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-02-24 16:42:08 +07:00
Carl Schwan db6927ee05 Improve performance when converting between DBs
Use a transaction when doing multiple inserts increase the writing
speed.

Ref: https://stackoverflow.com/a/68495887

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-02-16 18:28:06 +07:00
Julius Härtl 415294e345
Add index for direct editing cleanup job
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-07 09:25:27 +07:00
Côme Chilliet 071ceff7e2
Fixes occ user:info when the user never logged in
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-27 16:33:24 +07:00
Côme Chilliet b0e6a10263
Use the new function in user:setting occ command
instead of direct database queries

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-24 11:16:44 +07:00
Vincent Petry 14c60b10d0
Merge pull request #30275 from nextcloud/bugfix/noid/add-version-of-disabled-apps-when-available
Add version of disabled apps when available
2022-01-14 11:59:25 +07:00
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Carl Schwan aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-12 20:03:06 +07:00
Christoph Wurst ed84f07784
Add missing index for propertypath only queries against properties
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-23 15:51:50 +07:00
Joas Schilling a376aa6c61
Add version of disabled apps when available
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-15 09:08:14 +07:00
John Molakvoæ 5a766ef004
Allow to delete non-migrated previews instead of moving them
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-12-09 17:34:45 +07:00
Joas Schilling 536a812de4
Add an index for selecting the next job
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 23:57:40 +07:00
Côme Chilliet 113756db30
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +07:00
Christoph Wurst 781ec814e6
Do not print verbose info about app updates if there are none
This is cosmetical but if you have a large number of apps installed then
you'll see a wall of text during the server and app upgrade when it
tries to update each app via the app store. In may cases nothing will be
updated. For those boring cases we can hide the verbose info, but show
when occ is run with -v. Any actual update will still print a few lines.
Those are the important ones for the admin.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-18 09:11:22 +07:00
Robin Appelman 5155f2b0c5
Merge pull request #28541 from nextcloud/path-prefix-index2
add a prefix index to filecache.path, attempt 2
2021-10-19 14:41:23 +07:00
Joas Schilling 0a812a1c09
Adjust namespace and print a message when the job was skipped
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-14 09:57:16 +07:00
Joas Schilling 9cd9f4b4bc
Move queries to the joblist
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-14 09:57:16 +07:00
Joas Schilling e2a7482b49
Add a command to show info about a background job and force-execute it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-14 09:57:16 +07:00
Robin Appelman 695326534c
disable path prefix index on postgresql for now
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement.
to prevent making it harder to add the correct index later on we don't create the index for now on postgresql

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:39:22 +07:00
Robin Appelman abd6b354ac
add a prefix index to filecache.path
The reason that `filecache.path` hasn't had an index added is the mysql limitation of ~1kb for indexeded fields,
which is to small for the `path`, however mysql supports indexing only the first N bytes of a column instead of the entire column,
allowing us to add an index even if the column is to long.

Because the index doesn't cover the entire column it can't be used in all situations where a normal index would be used, but it does cover the `path like 'folder/path/%'` queries that are used in various places.

Sqlite and Postgresql don't support prefix indexes, but they also don't have the 1kb limit and DBAL handles the differences in index creation.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-08 18:38:25 +07:00
Robin Appelman 6502dfae34
add better index for finding unindexed paths
for the following query 'SELECT "path" FROM "oc_filecache" WHERE ("storage" = $storage) AND ("size" < 0) ORDER BY "fileid" DESC LIMIT 1;'

currently the database will in some cases decide to priorize the sort by fileid over the filter when picking what index to use, resulting in a much slower query.

by creating an index that allows first sorting by fileid and also filter by storage and size this case will be greatly sped up

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-07 16:11:49 +07:00
Carl Schwan 59174cfa7c
Merge pull request #28492 from nextcloud/bugfix/occ-status
Align occ status with status.php
2021-09-30 17:45:22 +07:00
Arthur Schiwon 27865d03c0
use specific email getter where necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-09 19:23:05 +07:00
Julius Härtl 3b6be67719
Align occ status with status.php
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-08-26 22:36:26 +07:00
Julius Härtl d201dc2c93
Add active user count to occ user:report
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-08-19 16:22:20 +07:00
John Molakvoæ (skjnldsv) edeb8a5739
Add storage info to `user:info` command
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-08-18 08:38:49 +07:00
Joas Schilling 5390d3194f
Make integrity commands verbose
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-07-08 21:21:57 +07:00
Christoph Wurst 770881d5d6
Move DateTime::ATOM to DateTimeInterface::ATOM
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-23 15:28:07 +07:00