Commit Graph

2971 Commits

Author SHA1 Message Date
Julius Härtl fcc0d35895
Add share type for deck
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Julius Härtl fdea545415
Allow apps to register their share providers from outside
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-09 13:20:23 +01:00
Joas Schilling fe9c46e595
Add an endpoint to search for accounts based on phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Christoph Wurst cc92d5a293
Allow unified search results to have attributes
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-03 18:24:33 +01:00
Roeland Jago Douma 6f4d3edb5e
Merge pull request #24113 from nextcloud/extend-cache-events
extend cache events
2020-12-02 19:48:20 +01:00
Robin Appelman aef1cdba03
code style and dispatchTyped
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-12-02 16:15:02 +01:00
Morris Jobke d87705a894
Allow subscription to indicate that a userlimit is reached
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-12-02 15:20:03 +01:00
Morris Jobke a125d8aaa1
Reduce code complexity in Share::getItems by tracing all remaining callers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-29 22:30:09 +01:00
Robin Appelman 88f35d52d2
rename cache event to follow new naming standards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-26 15:39:46 +01:00
Robin Appelman 23fb497ff5
extend cache events
- adds cache remove event
- expose storage id in event
- emit events during cache move

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-26 15:22:03 +01:00
Christoph Wurst 54e3beba16
Merge pull request #24319 from nextcloud/techdebt/noid/streamline-user-creation-and-deletion-events
Streamline user creation and deletion events
2020-11-26 14:09:54 +01:00
Robin Appelman 9d4848e863
use in objectstore copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-11-24 15:16:58 +01:00
Roeland Jago Douma d4fd61b7c6
Merge pull request #24324 from nextcloud/td/psalm/backgroundjob_job
Fix the OCP\BackgroundJob\Job to make it compatible with  its interface
2020-11-24 13:16:12 +01:00
Roeland Jago Douma 82d3f50b78
Fix the OCP\BackgroundJob\Job to make it compatible with its interface
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-24 09:33:49 +01:00
Morris Jobke f4c1512bb7
Fix typo in @deprecated PHPDoc tag
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-24 00:13:09 +01:00
Morris Jobke 9bf76d2bad
Streamline user creation and deletion events
CreateUserEvent was the only one that didn't matched the naming scheme of BeforePASTTENSEEvent and PASTTENSEEvent. The event wasn't used at all so this just removes it again as there is BeforeUserCreatedEvent that is also available since 18.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-23 23:59:52 +01:00
Lukas Reschke a5d4d3d4cc
Add IRequest taint sources
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2020-11-22 23:04:43 +01:00
Roeland Jago Douma 1e111b2ad2
Fix DataResponse typehints
We use this already in several places where we just pass strings or
numbers.
This all works because we just convert it to a json response in the end.
So better to have the typehints reflect this.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-19 20:34:42 +01:00
Roeland Jago Douma 66013f906d
Merge pull request #24189 from nextcloud/enh/csp/frame-ancestors
Set frame-ancestors to none if none are filled
2020-11-18 11:29:28 +01:00
Roeland Jago Douma 9163790b7c
Set frame-ancestors to none if none are filled
frame-ancestors doesn't fall back to default-src. So when we apply a
very restricted CSP we should make sure to set it to 'none' and not
leave it empty.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-18 10:13:36 +01:00
Roeland Jago Douma 72a9c35be3
Remove some IRouter methods
This is not the end. IRouter needs to burn.
But it is a start.

🎵 we didn't start the fire 🎵

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-17 14:08:20 +01:00
Joas Schilling a8cb8e21c1
Add types to function builder
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-16 19:46:24 +01:00
Joas Schilling d5df033ede
Create primary keys on all tables and add a command to create the afterwards
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-10 15:36:27 +01:00
Joas Schilling d9e471771a
Update parameters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-07 14:06:03 +01:00
Joas Schilling ede7510854
Add a function to get the unread count for multiple objects in one go
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-04 11:01:21 +01:00
Morris Jobke dc479aae2d
Improve CertificateManager to not be user context dependent
* removes the ability for users to import their own certificates (for external storage)
* reliably returns the same certificate bundles system wide (and not depending on the user context and available sessions)

The user specific certificates were broken in some cases anyways, as they are only loaded if the specific user is logged in and thus causing unexpected behavior for background jobs and other non-user triggered code paths.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-03 00:13:01 +01:00
Roeland Jago Douma fa6a790859
Remove deprecated OCSResponse
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-01 14:12:27 +01:00
Roeland Jago Douma fe46149560
Psalm fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-30 19:27:53 +01:00
Morris Jobke 1654826e83
Merge pull request #23742 from nextcloud/enhancement/eventdispatcher-typed-listener-callable
Type the event dispatcher listener callables with Psalm
2020-10-30 09:54:48 +01:00
Morris Jobke 7ed11b6dfa
Merge pull request #23765 from nextcloud/techdebt/noid/sudadmin-events-into-typed-events
Add typed events for adding and removing a subadmin
2020-10-29 11:18:01 +01:00
Morris Jobke 5fab33ddc5
Merge pull request #23770 from nextcloud/techdebt/noid/remove-deprecated-isection
Remove ISection in favor of IIconSection
2020-10-29 09:00:57 +01:00
Morris Jobke b9de133e16
Merge pull request #23771 from nextcloud/techdebt/noid/remove-deprecated-inotifystorage-listen
Remove deprecated INotifyStorage::listen
2020-10-29 08:58:15 +01:00
Morris Jobke b8ed997238
Remove ISection in favor of IIconSection
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 23:05:00 +01:00
Morris Jobke 32e4a61cac
Remove deprecated INotifyStorage::listen
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 23:02:25 +01:00
Morris Jobke 8218ae4274
Deprecate OCP\Util::connectHook and emitHook
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 22:30:24 +01:00
Morris Jobke e4f53ff91b
Add typed events for adding and removing a subadmin
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 21:55:08 +01:00
Christoph Wurst b5f75ccdd8
Merge pull request #23746 from nextcloud/enhancement/iusermanager-callforseenusers-typed-closure
Type the \OCP\IUserManager::callForSeenUsers closure with Psalm
2020-10-28 20:05:53 +01:00
Christoph Wurst 7e72866811
Type the \OCP\IUserManager::callForSeenUsers closure with Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-28 19:21:00 +01:00
blizzz 6b2cf46125
Merge pull request #23752 from nextcloud/fix/noid/wfe-ux-errors
inform the user when flow config data exceeds thresholds
2020-10-28 16:05:35 +01:00
Arthur Schiwon 1eb86e46fd
inform the user when flow config data exceeds thresholds
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-10-28 14:07:14 +01:00
Morris Jobke ad3063a77b
Merge pull request #23744 from nextcloud/enhancement/appframework-initialstate-typed-closure
Type the \OCP\AppFramework\Services\IInitialState::provideLazyInitial…
2020-10-28 14:03:34 +01:00
Christoph Wurst e8e13c845c
Type the \OCP\AppFramework\Services\IInitialState::provideLazyInitialState closure with Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-28 09:04:15 +01:00
Christoph Wurst a2206b8cfb
Type the \OCP\IUserManager::callForAllUsers closure with Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-28 08:58:38 +01:00
Christoph Wurst 469ba175ce
Type the event dispatcher listener callables with Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-28 08:54:24 +01:00
Roeland Jago Douma eadce7fadd
Merge pull request #23601 from nextcloud/techdebt/noid/comments-manager-improvements
Comments manager improvements/extensions needed by Talk
2020-10-27 19:57:55 +01:00
Roeland Jago Douma 7949854837
Merge pull request #23712 from nextcloud/enh/noid/add-size-to-file-obj-definition
Add optional size field for the file obj
2020-10-27 19:51:31 +01:00
Christoph Wurst a79ed0653b
Deprecate \OCP\EventDispatcher\IEventDispatcher::dispatch
As discussed in
https://help.nextcloud.com/t/deprecation-of-ieventdispatcher-dispatch/95381

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-27 15:43:07 +01:00
Vincent Petry f7fd8d520d
Add optional size field for the file obj
Add optional size field for the file rich object definition.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-10-27 11:48:41 +01:00
Joas Schilling da3d384426
Fix missing since
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-22 12:02:48 +02:00
Joas Schilling 2dd50b4adc
Fix return type
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 11:02:05 +02:00
Joas Schilling 4b8fec49e7
Add return description
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 10:05:51 +02:00
Joas Schilling d462439a63
Get the last comment date for a list of actors (to allow sorting mention suggestions e.g.)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:18:51 +02:00
Joas Schilling 89651c5233
Allow to search on multiple objects with one query
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:16:42 +02:00
Joas Schilling 326640462b
Add methods to get the number of comments and last comment since a date
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:15:38 +02:00
Joas Schilling 2cc35cc65d
Include an option to also include the lastKnownCommentId object
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 09:08:48 +02:00
John Molakvoæ (skjnldsv) 3e1916080a
Add ICommentsManager::load method
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-10-20 14:39:28 +02:00
Christoph Wurst e646d7d5a9
Add psalm types for the event dispatcher
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-15 16:23:26 +02:00
Christoph Wurst 65fb50f9fb
Add psalm types for the migration schema closure
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-15 10:58:51 +02:00
Christoph Wurst f9f20b63f4
Annotate IContainer so Psalm knows what resove and query return
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-14 12:29:26 +02:00
Morris Jobke a70f283734
Merge pull request #23409 from nextcloud/fix/cache-entry-array-access
The file cache entry is array accessible
2020-10-13 17:54:21 +02:00
Christoph Wurst b2de9a6f9e
The encryption decrypt position can be int or string
The public API said string, internally we treated it as int. In reality
both are used. Let's reflect that in the documented argument type.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-13 10:51:22 +02:00
Christoph Wurst 0da89c0fa1
The file cache entry is array accessible
… so let's make this part of our API. We use it as array already.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-13 10:47:00 +02:00
Christoph Wurst ccfe6a9fa5
Add Psalm type for the bootstrap registration context
This can potentially catch a few bugs with wrong class strings.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-12 15:16:16 +02:00
Christoph Wurst a1b351036c
Add template typing to the QBMapper
The QBMapper is kind of a generic type, though this concept does not
exist in php. Hence you have a lot of type coercion in subtypes (mappers
in the individual apps) because you suddenly don't expect an Entity[]
but your specific type.

Luckily Psalm lets us type those. Then in the subclass you can
psalm-implement the mapper with a concrete type and psalm will do all
the magic to ensure types are used correctly.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-12 11:10:08 +02:00
Morris Jobke 26a38c4e8a
Job::run() does not return anything
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-08 16:52:02 +02:00
Morris Jobke c1fd22b025
Merge pull request #23144 from nextcloud/enh/noid/update-param-for-psalm
Less psalm warnings
2020-10-06 22:07:58 +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
Roeland Jago Douma f865a3a1c2
Move initial state provider to boostrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-04 09:35:33 +02:00
Daniel Kesselberg 0e3ddf1b27
Add explicit typecast for $value.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-10-03 17:15:14 +02:00
Daniel Kesselberg 64b10f61df
Update signature for set
also ILiteral and IQueryFunction are valid.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-10-02 19:15:34 +02:00
Daniel Kesselberg 8fdb74bdd5
Update signature for in/notIn
$y is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-10-02 19:09:28 +02:00
Daniel Kesselberg d14c971ad6
Update signature for like/notLike/in/notIn
$x is always passed to quoteColumnName hence ILiteral|IParameter|IQueryFunction are supported.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-10-02 18:59:53 +02:00
Julius Härtl 8ab2422b6c
Add acutal response to BeforeTemplateRenderedEvent
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-24 20:00:23 +02:00
Morris Jobke cb735c671b
Provide correct PHPDoc tags for public namespace
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 19:50:44 +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
Robin Appelman 674db6da88
add event to allow apps to overwrite user quota
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-09-17 16:32:48 +02:00
Morris Jobke 99c9423766
Remove @suppress SqlInjectionChecker
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-16 15:53:56 +02:00
Joas Schilling 702c858604
It is very highly recommended to set an object for better filtering
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-09-15 10:22:54 +02:00
Christoph Wurst 0022b63fe8
Fix serializing indexed unified search array as object
We expect an array of results from the search provider. If the search
provider returns an array with indexes, php will serialize it as object,
not as array (to preserve the keys). The client doesn't need this info,
so we should just discard it and take the values only to always render a
JSON array.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-11 15:57:04 +02:00
Julius Härtl cee531d6bc
Annotate that writeStream can throw a GenericFileException
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-10 09:03:53 +02:00
Morris Jobke 6f4ea73e0c
Merge pull request #22644 from nextcloud/fix/license-headers-20-2
Update license headers for Nextcloud 20 (again)
2020-09-07 20:34:36 +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
Georg Ehrke d7ccc616e4
Always use IUserStatus consts
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-09-07 11:30:18 +02:00
John Molakvoæ 593d64d935
Merge pull request #17456 from brad2014/feature/brad2014/12391-improve-imip-mail-message-take-2 2020-09-04 19:53:02 +02:00
Brad Rubenstein 442af8c5d5 Minor cleanup: php-cs-fixer, tests, interface consistency
IMipPlugin.php Removed blank lines to make php-cs-fixer happy.
Minor cleanup:  bugs found by Psalm static checker
IEMailTemplate: The public interface to addBodyListItem also needs to include the new plainIndent parameter.
IMipPlugin: Fixes an undefined variable for events that do not have DTEND.  Also use explicit string conversion for parameters and properties in several places.

The new email template adds an additional blank line before "button" links in plain text, so the tests were fixed to include that additional blank line.

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2020-09-02 17:54:36 +02:00
Julius Härtl e0ae37745a
Do not expose direct editing if no master key is available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-01 11:40:27 +02:00
Roeland Jago Douma d0a7f833cc
Merge pull request #22116 from nextcloud/bugfix/noid/transfer-ownership-share-root
Fix share transfer of single files and on the transfered node
2020-09-01 08:50:22 +02:00
blizzz 849c13f202
Merge pull request #22472 from nextcloud/fix/contacts-interaction-blob-postgres
Fix writing BLOBs to postgres with recent contacts interaction
2020-08-31 15:07:22 +02:00
Julius Härtl ac2999a26a
Transfer shares of the transferred root node
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-31 14:23:34 +02:00
Roeland Jago Douma 7b8364e001
Merge pull request #21288 from lmamane/master
Return correct loginname in credentials
2020-08-28 16:11:46 +02:00
Christoph Wurst 3bc54bfd06
Fix writing BLOBs to postgres with recent contacts interaction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-28 14:30:33 +02:00
Roeland Jago Douma b5e9f7e846
Merge pull request #22432 from nextcloud/enh/phpdoc
Add php docs build script
2020-08-26 21:18:11 +02:00
Julius Härtl 45a474071e
Remove @package annotations from public namespace
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-26 16:59:40 +02:00
Julius Härtl 94c0ca4b8c
Remove wrongly annotated package names
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-26 12:35:27 +02:00
Joas Schilling 0934aee46b
Merge pull request #22359 from nextcloud/fix/noid/flow-leaking-scope
fix possible leaking scope in Flow
2020-08-25 10:40:26 +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
Arthur Schiwon 28c0eea8cb
fix possible leaking scope in Flow
- a configured flow can be brought into consideration, despite its event
  was not fired
- it could either run through
- or run into a RuntimeException and killing processing of valid flows

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-08-24 13:44:01 +02:00
Lionel Elie Mamane ac8b40b8b1
Return correct loginname in credentials,
even when token is invalid or has no password.

Returning the uid as loginname is wrong, and leads to problems when
these differ. E.g. the getapppassword API was creating app token with
the uid as loginname. In a scenario with external authentication (such
as LDAP), these tokens were then invalidated next time their underlying
password was checked, and systematically ceased to function.

Co-authored-by: kesselb <mail@danielkesselberg.de>
for: switch to consistent camelCase

Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
2020-08-20 16:02:22 +02:00
Morris Jobke c449d54204
Merge pull request #22304 from nextcloud/techdebt/noid/matching-param-names
Use matching parameter names form interfaces and implementations
2020-08-19 19:34:02 +02:00
Morris Jobke fedf9c69d9
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 18:16:35 +02:00
Joas Schilling 35a8519591
Fix CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-19 11:20:36 +02:00
Joas Schilling e66bc4a8a7
Send "429 Too Many Requests" in case of brute force protection
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-19 11:20:35 +02:00
Morris Jobke e47cfc9a54
Properly add new methods to interface and document in PHPDoc for getRootMounts()
Introduced in #22063 and was just forgotten.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-17 17:13:46 +02:00
Daniel Kesselberg 10ac844448
Update documentation for QueryBuilder::set
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-14 19:55:01 +02:00
Morris Jobke 16d83ab30a
Remove getLastJob from IJobList
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-13 21:50:06 +02:00
Morris Jobke 725fecee34
Merge pull request #21344 from nextcloud/fix/twofactor-cleanup-event
Emit an event for every disabled 2FA provider during cleanup
2020-08-13 07:25:01 +02:00
Morris Jobke 8fc877ff7d
Merge pull request #22117 from nextcloud/activity-settings-grouping
allow grouping of activity settings
2020-08-11 11:24:23 +02:00
Morris Jobke 782a2df392
Add PHP doc for events
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-10 14:24:24 +02:00
Morris Jobke 54726d5934
Merge pull request #21738 from nextcloud/techdebt/14552/migrate-OC_Group-post_removeFromGroup
Migrate OC_Group post_removeFromGroup hook to actual event object
2020-08-07 17:46:00 +02:00
Morris Jobke 96d418b379
Add proper deprecation message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-07 17:45:45 +02:00
Morris Jobke 438ac23e2a
Distribute preview folders in appdata in multibucket setup to multiple buckets
* introduces a new IRootMountProvider to register mount points inside the root storage
* adds a AppdataPreviewObjectStoreStorage to handle the split between preview folders and bucket number

Ref #22033

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:20 +02:00
Morris Jobke 3f1c48598d
Merge pull request #22112 from nextcloud/enh/noid/flow-entity-recreatable-state
Allow Flow entity state to be recreated
2020-08-06 09:36:32 +02:00
Julius Härtl 018be662f4
Refactor API to match the widget wording
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-05 17:03:38 +02:00
Joas Schilling 55473dd2eb
Merge pull request #22104 from nextcloud/enh/search/make-app-handle-the-order-logic
Make apps handle the order logic
2020-08-05 16:38:45 +02:00
Robin Appelman 227e362842
allow grouping of activity settings
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-05 16:13:03 +02:00
Morris Jobke 6fbf8fceac
Merge pull request #22106 from nextcloud/feature/noid/user_status_api
Provide a PHP Api for UserStatus
2020-08-05 15:30:48 +02:00
Joas Schilling ea8f68bea6 Hand in the route and the parameters of the request
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-08-05 12:52:16 +00:00
John Molakvoæ a4d511d827
Merge pull request #22099 from nextcloud/fix/unified-search 2020-08-05 14:17:42 +02:00
Georg Ehrke 0e0e0d19e8
Provide a PHP Api for UserStatus
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-05 13:48:46 +02:00
Arthur Schiwon 6c1c9273c0
Enable Flow entities to recreate state if necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-08-05 13:24:20 +02:00
Morris Jobke 0581356169
Merge pull request #22097 from nextcloud/enh/noid/empty-template
Add empty renderAs template
2020-08-05 11:42:29 +02:00
John Molakvoæ (skjnldsv) d98f7c1bd8
Make apps handle the order logic
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-08-05 11:37:45 +02:00
Georg Ehrke b0c5457c42
IAddressBook: add isShared and isSystemAddressBook
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-05 09:04:41 +02:00
John Molakvoæ (skjnldsv) 71b62c4203
Show mime icon, bump bundles, make the SearchResultEntry class non-abstract, Fix header search icon, various fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-08-04 21:36:22 +02:00
Julius Härtl b51746212e
Add base renderAs template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-04 09:48:43 +02:00
Morris Jobke 489fecac32
Merge pull request #22057 from nextcloud/fix/20009/contactsmenu-limit-users
contactsmanager shall limit number of results early
2020-08-03 15:15:46 +02:00
John Molakvoæ (skjnldsv) 1a1b3e20e4 Fix unified search
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2020-08-03 11:26:03 +00:00
Georg Ehrke 0fad921840
Add user-status app
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-31 16:45:27 +02:00
Arthur Schiwon 7c56283c3c
contactsmanager shall limit number of results early
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-07-31 12:42:17 +02:00
Morris Jobke 084f5063f2
Deprecate BeforeUserRemovedEvent because it can't be triggered in all cases
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-30 10:21:08 +02:00
Morris Jobke 7e28286e9d
Merge pull request #21542 from nextcloud/activity-notifications
basic settings system for activity notifications
2020-07-29 15:36:38 +02:00
Robin Appelman c8427781b4
implement old settings interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-24 13:03:35 +02:00
Julius Härtl e1b696929f
Move NotFoundResponse to a proper TemplateResponse
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-24 08:58:14 +02:00
Roeland Jago Douma e0cc95f3aa
Allow user backends to specify a custom logout url
* Allows SSO backends to do a global logout

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-23 10:42:40 +02:00
Morris Jobke 7870ca0663
Use the proper IAppContainer and IServerContainer type hints to know which code runs with which container
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-21 20:44:05 +02:00
Christoph Wurst e029055e76
Make the bootstrap context return ContainerInterface instances
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-21 20:42:24 +02:00
Robin Appelman 5eb1e75e24
build autoloader
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-21 19:26:59 +02:00
Robin Appelman aa051875f9
improve default notification fallback
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-21 17:40:22 +02:00
Robin Appelman fb5ae20722
basic settings system for activity notifications
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-21 17:12:38 +02:00
Morris Jobke 09e6b26bdd
Merge pull request #21875 from nextcloud/techdebt/deprecate-ilogger
Deprecate ILogger in favor of the PSR-3 logger
2020-07-20 16:45:14 +02:00
Morris Jobke 9ae75a3ca9
Merge pull request #21850 from nextcloud/techdebt/noid/register-alternative-logins
Allow to register AlternativeLogin on RegistrationContext
2020-07-20 14:20:03 +02:00
Christoph Wurst 22ff03969e
Undeprecate IAppContainer and IServerContainer
With 4152216bd8 these two interfaces got
deprecated with the reasoning that we only need the base PSR interface.
However, there are cases where in Nextcloud you still want to have a
specific container (the one for the app vs the one for the server) when
you either have a container injected or query one from a container.

With a single interface that would not be possible. So it's probably
better if we leave the two interfaces, but only have them extend the PSR
interface. IContainer – with the custom methods – shall still be phased
out, but the two other sub interfaces can stay for tagging purposes.
Tagging means that no methods shall be added.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-17 10:17:18 +02:00
Joas Schilling cae849bcf9
Merge pull request #21869 from nextcloud/techdebt/noid/add-constants-for-magic-strings
Add constants for the magic strings of template rendering
2020-07-16 22:00:57 +02:00
Christoph Wurst 8a433a7226
Deprecate ILogger
The logger service was always intended to follow the PSR-3 interface.
It's time to embrace this and switch over to the "official" API,
hence this custom interface can be slowly phased out.

With Nextcloud 20 the logger also got support for
* App id filled out automatically
* Exceptions handling (as replacement for logException)

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 19:19:23 +02:00
Christoph Wurst efd2835b23
Deprecate the server container getters
Service locators are an anti pattern. These getters just make it more
appealing to do the wrong thing. If you want to locate a service the bad
way, just use the `get` method on a container – it will do the same in
also one line of code.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 18:59:56 +02:00
Joas Schilling 49970639fa
Add constants for the magic strings of template rendering
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-16 15:47:28 +02:00
Joas Schilling 0dfcc132ca
Allow to register AlternativeLogin on RegistrationContext
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-16 14:20:24 +02:00
Christoph Wurst 4152216bd8
Use PSR container interface and deprecate our own abstraction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 13:35:45 +02:00
Morris Jobke c4b53538af
Better event description for BeforeTemplateRenderedEvent in files and files_sharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-15 20:15:51 +02:00
Roeland Jago Douma 7d7ba61625
Add real events to load additionalscripts
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-15 14:07:18 +02:00
Julius Härtl 35bdb998ef
Dashboard strict typing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:12 +02:00
Julius Härtl 31a1494529
Add load method for apps to bootstrap their panels
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl b71de68f43
Cleanup public api methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl f7c04b0415
Deprecate panel register event right away but keep it for not breaking backward compatible apps
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl 81e5593133
Move to lazy panel registration during registration context
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:27:57 +02:00
Julius Härtl 544fcdb549
Deprecate old dashboard API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:24:51 +02:00
Julius Härtl 673d70dfc5
Add new dashboard public API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:24:50 +02:00
Roeland Jago Douma 725872c23a
Make the subscription registry lazy
This will allow to do lazy registration here which should allow for
loading less (or at least only when needed!).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 12:21:06 +02:00
Roeland Jago Douma 7d128ebf3e
Remove old deprecated getAppFolder
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-06 22:06:58 +02:00
Morris Jobke 4e8552929b
Merge pull request #20729 from nextcloud/cleanup/noid/shared-tags-code
Tags.php and the old sharing mechanism
2020-07-06 21:30:48 +02:00
Roeland Jago Douma 37b2121ccf
Deprecate registerRoutes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-06 15:15:20 +02:00
Morris Jobke e20db42a0c
Tags.php and the old sharing mechanism
The old sharing mechanism isn't working anymore, because it was replaced by Share 2.0. Also it was nowhere used so this removes the code paths and reduces complexity.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 14:12:12 +02:00
Morris Jobke fb69d6d195
Merge pull request #21238 from nextcloud/techdebt/noid/deferrable-notification-apps
Allow notification apps to defer and flush the sending
2020-07-06 13:50:25 +02:00
Morris Jobke 6c825ee9a0
Merge pull request #21665 from nextcloud/debt/noid/job-list
Fix wrong phpdoc for execute method
2020-07-06 11:14:14 +02:00
Morris Jobke b1cdd0dd9b
Use formal type hints instead of informal PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 10:13:23 +02:00
Morris Jobke e900f424ce
Merge pull request #21636 from nextcloud/lock-exception-readable-path
add proper paths to locking exceptions
2020-07-05 22:37:12 +02:00
Morris Jobke d3d11cb826
Merge pull request #21626 from nextcloud/enhancement/injectible-callables
Callable parameter injection
2020-07-05 22:03:12 +02:00
Roeland Jago Douma 4d8b4ef3cc
Merge pull request #21533 from nextcloud/techdebt/noid/dedicated-method-to-get-a-users-language
Techdebt/noid/dedicated method to get a users language
2020-07-04 08:56:13 +02:00
Joas Schilling 3d559159f0
Allow notification apps to defer and flush the sending
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-03 16:44:43 +02:00
Christoph Wurst 4a3ea04baa
Callable parameter injection
This is like what we have to DI and classes, but for callables.

The motivating factor is to get rid of *service locators* in the `boot`
method of apps as a new pattern is about to emerge where we have lots of
`query` calls on the app or server container in order to fetch some
services.

With this little helper it's possible to call another (public) method
and magically have everything injected.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-03 14:37:46 +02:00
Daniel Kesselberg 9b10d35477
Fix wrong phpdoc for execute method
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-07-03 10:47:15 +02:00
Joas Schilling 19e1efd1dd
Merge pull request #21439 from nextcloud/feature/noid/move-autocomplete-filter-event-to-new-dispatcher-and-class
Move AutoComplete::filterResults to new event dispatcher and GenericE…
2020-07-03 10:03:34 +02:00
Joas Schilling b997edad10
Add a dedicated method to get the language for another user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-01 10:20:07 +02:00
Joas Schilling 35c6b1236f
Move AutoComplete::filterResults to new event dispatcher and GenericEvent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-01 09:57:33 +02:00
Daniel Kesselberg 87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-30 23:46:22 +02:00
Robin Appelman da2d425044
add proper paths to locking exceptions
while some code paths do wrap the "raw" locking exception into one with a proper path, not all of them do
by adding the proper path to the original exception we ensure that we always have the usefull information in out logs

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-06-30 18:10:42 +02:00
Joas Schilling b7060be18d
Fix robots "noindex, nofollow" signals
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-25 08:29:43 +02:00
Christoph Wurst 27b8637e3e
Deprecate \OCP\ISearch
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 14:20:26 +02:00
Christoph Wurst f8e08a74ba
Implement unified search for Files
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 14:20:26 +02:00
Christoph Wurst 4488e846a5
Add unified search API
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-24 14:20:25 +02:00
blizzz 859941db32
Merge pull request #21479 from nextcloud/fix/21474/allow_specifying_cookie_type
Allow to specify the cookie type for appframework responses
2020-06-22 13:00:12 +02:00
blizzz a899b4775d
Merge pull request #21475 from nextcloud/enh/noid/flow-event-dispatcher
flow to not use deprecated event dispatcher methods
2020-06-22 11:18:50 +02:00
Roeland Jago Douma fbf9772a3e
Allow to specify the cookie type for appframework responses
In general it is good to set them to Lax. But also to give devs more
control over them is not a bad thing.

Helps with #21474

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-06-22 08:38:44 +02:00
Arthur Schiwon 3706eae777
flow to not use deprecated event dispatcher methods
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-19 23:03:07 +02:00
Christoph Wurst 2b7b7144d4
Allow crash reporters registration during app bootstrap
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-19 10:38:26 +02:00
Christoph Wurst 5bc8510b3b
Load the app.php before running apps' boot method
Some apps require the composer autoloader from app.php. If we run boot
before including that file, classes and functions from dependencies
won't be found.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 14:44:02 +02:00
Christoph Wurst 69571fb536
Add dedicated API for apps' bootstrapping process
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:21 +02:00
Christoph Wurst 68794ebc92
Emit an event for every disabled 2FA provider during cleanup
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-16 14:38:33 +02:00
Roeland Jago Douma 19712e2773
Merge pull request #21311 from nextcloud/techdebt/noid/make-share-order-reliable
Always sort shares in a reliable way
2020-06-09 10:33:41 +02:00
Christoph Wurst fec3fefad7
Deprecate \OCP\IServerContainer::getEventDispatcher
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-08 19:10:26 +02:00
Joas Schilling 56b04c65f7
Always sort shares in a reliable way
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-08 14:47:15 +02:00
Roeland Jago Douma 6aa6ab3e02
Add lazy events for the Node API
Right now if you want to get events via the Node API you have to have a
real instance of the Root. Which in turns sets up the whole FS.

We should make sure this is done lazy. Else enabling the preview
generator for example makes you setup the whole FS on each and every
authenticated call.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-28 12:35:45 +02:00
Roeland Jago Douma c92c378a9c
Copy over the ETag and LastModified when formatting a Dataresponse
This way the ETag checks etc are all working.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-19 09:39:51 +02:00
Joas Schilling 787c2a17e3
Allow links to conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-05-13 16:05:55 +02:00
Roeland Jago Douma 4fbea316a7
Merge pull request #20897 from nextcloud/bugfix/httpcache
Proxy server could cache http response when it is not private
2020-05-13 08:27:05 +02:00
Clement Wong e9be3a9090 Add public argument to Http cacheFor()
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-10 20:24:14 +02:00
Clement Wong 401210d259 Proxy server could cache http response when it is not private
Signed-off-by: Clement Wong <git@clement.hk>
2020-05-10 11:24:08 +02:00
Morris Jobke 08e78ff3b2
Fix OCPSinceChecker and php-cs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-08 11:20:46 +02:00
Roeland Jago Douma 163463dea5
Add InitialState Appframework service
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-07 10:13:06 +02:00
Roeland Jago Douma e923d7b42f
Merge pull request #20782 from nextcloud/enh/appframework/appconfig_wrapper
Simple AppConfig wrapper for the AppFramework
2020-05-07 08:43:55 +02:00