Граф коммитов

386 Коммитов

Автор SHA1 Сообщение Дата
Julien Veyssier 4d48e9d363
rename most image stuff to file/media/attachment
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-09-06 14:44:53 +02:00
Julien Veyssier 3fec1f052d
allow media file upload, handle display in ImageView
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-09-06 14:44:53 +02:00
Julius Härtl 3f6f5d1e03
Do not try to get a displayname for guests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 11:23:22 +02:00
Julius Härtl 2e3c92ac00 Implement notification backend for mentions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-25 11:04:53 +02:00
Luka Trovic 890e615929 fix: feedback
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-25 11:04:53 +02:00
Luka Trovic e15dc93ec5 feat: display correct username and use ISearch to search users
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2022-08-25 11:04:53 +02:00
Luka Trovic 5e0d9f49ee feat: add user mentions feature
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2022-08-25 11:04:53 +02:00
Julius Härtl 63a36201cc
Merge pull request #2831 from nextcloud/bugfix/noid/occ 2022-08-25 10:58:19 +02:00
Julius Härtl a951f168ac
Fix reset occ command
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-24 11:08:03 +02:00
Julius Härtl d0d85624c0 Use displayname cache for fetching session data
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-17 12:13:09 +02:00
Julius Härtl ba47efcec3
Avoid duplicate queries that were caused by running execute and the mapper find method
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-15 18:43:43 +02:00
Julius Härtl 09c9489bef Add option to set default file extension and disable rich editing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-07-19 06:23:37 +00:00
Vinicius Reis 3d58268f8c
🩹 (#2719): fix interface typing
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
2022-07-18 16:47:41 -03:00
Julius Härtl f8b1225023
Fix some psalm issues with Entities
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-18 12:46:23 -03:00
Julius Härtl c00ad0aa5a
More typing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-18 12:46:23 -03:00
Julius Härtl 8b3a4d27c0
More typing and remove unused property
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-18 12:46:23 -03:00
Julius Härtl 7739cab653
Move to LoggerInterface
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-18 12:46:23 -03:00
Julius Härtl d27e2e0e6d
Strict types and move Exceptions to dedicated namespace
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-18 12:46:23 -03:00
Julien Veyssier 9d80897d44
refs #2705 adapt to latest changes in OCP\Color
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-07-11 17:10:51 +02:00
Julius Härtl 940e1b5876
Avoid duplicate queries and limit depth by default to 0
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-07-06 10:51:53 +02:00
Max bfe8a1386b
fix: always handle workspace properties
Signed-off-by: Max <max@nextcloud.com>
2022-07-06 10:51:52 +02:00
Max 741d952e13
fix: bring back the share owner handling and workspace file id
These fixes were lost when reverting 3e40b7b.

Signed-off-by: Max <max@nextcloud.com>
2022-07-06 10:51:52 +02:00
Carl Schwan 4f5a37dcbd
Assume that the default depth is 1 in DAV
Otherwise if the Depth header is ommited, the workspace information
won't be display at all.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-06 10:51:51 +02:00
Carl Schwan 82b1234031
Revert "fix: DAV only return workspace properties if they are set"
This reverts commit 3e40b7bce4.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-06 10:51:46 +02:00
Julius Härtl a79b154489 Adjust guest avatar style to be distinguishable from regular users
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-09 11:36:39 +02:00
Julius Härtl e1c0134640 Allow users to reset their guest name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-09 11:36:39 +02:00
Julius Härtl 738b8e238a Set guest name color also with empty names
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-09 11:36:39 +02:00
Julius Härtl 5e92525093
An empty string is a valid encoded result
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-09 08:59:56 +02:00
Raul a70841ac98 Encode file to UTF-8 on `fetch` call
Signed-off-by: Raul <raul@nextcloud.com>
2022-06-08 23:32:03 +02:00
Vinicius Reis acfb264ae5
⚰️ (#2345): remove unused icons
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
2022-05-27 12:27:54 -03:00
Julien Veyssier 1715a7cadf
move test, add comments for cleanup regexps
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-05-23 19:13:06 +02:00
Julien Veyssier cad9a1d7f6
change image target in markdown content to relative path, handle it in ImageView
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-05-23 16:32:03 +02:00
Raul 42a448c995 Add EncodingService test cases
Signed-off-by: Raul <raul@nextcloud.com>
2022-05-17 09:12:06 +02:00
Raul 4bbb8cc608 Add EncodingService
Signed-off-by: Raul <raul@nextcloud.com>
2022-05-17 09:12:06 +02:00
Julius Härtl 662a8aba4e
Merge pull request #2370 from nextcloud/bugfix/2357
Manually get a mounted instance of the file if needed during lock/unlock
2022-05-10 11:16:47 +02:00
Julien Veyssier c0c29644b5
refs #2338 improve and test ImageService::getUniqueFileName()
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-05-09 18:22:33 +02:00
Julien Veyssier 6759366d12
refs #2338 use '(n)' suffix instead of timestamp prefix to make sure attachment names are unique
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-05-09 12:46:27 +02:00
Julius Härtl b3a882657c
Manually get a mounted instance of the file if needed during lock/unlock
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-06 13:12:23 +02:00
Pierre Ozoux ce9daac3d7
Changes menu entry.
We realized with our users that when the apps Text and ONLYOFFICE are installed in parallel, this is a bit confusing.

You can see a screenshot here, in french:
https://forge.liiib.re/indiehost/tech/plateforme/-/issues/217#note_9733

So we propose this change.

In relation to this change in [onlyoffice app](https://github.com/ONLYOFFICE/onlyoffice-nextcloud/pull/617).

Signed-off-by: Pierre Ozoux <pierre@ozoux.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-04-27 13:28:20 +02:00
Julius Härtl de93bcee44
Use proper file id source for public shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 16:04:53 +02:00
Julius Härtl ff819afde9
Make psalm happy
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 13:27:44 +02:00
Julius Härtl ede33b50d4
Unlock during session cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 13:27:44 +02:00
Julius Härtl fa139cfa1b
Also take mtime into account for change detection during editing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 13:27:44 +02:00
Julius Härtl 5c9225e886
Expose lock in the text UI
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 13:27:44 +02:00
Julius Härtl 53d1012f7f
Open files read only if locked
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 13:27:44 +02:00
Julius Härtl 8c00c8eb25
Implement collaborative locking
Signed-off-by: Julius Härtl <jus@bitgrid.net>

TMP: Switch to OCP branch for tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Let locked files open in read only

Signed-off-by: Julius Härtl <jus@bitgrid.net>

Adapt LockScope to LockContext rename

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-21 13:27:43 +02:00
Jonas 1e5be8fab1
ImageController: Fix issues spotted by psalm
Signed-off-by: Jonas <jonas@freesources.org>
2022-04-19 11:02:25 +02:00
Julien Veyssier 5bdc049b62 harmonize prop/data names
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-03-31 10:36:17 +00:00
Julien Veyssier 6f619c0ce4
remove upload by link on server side, fix error management
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-03-31 11:18:46 +02:00
Côme Chilliet 73b27cb871
Fix a deprecation warning about returning bool from comparison function
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-29 10:17:00 +02:00
Julien Veyssier 7e55a798ee
use DataDownloadResponse instead of DataDisplayResponse to serve images
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-03-17 16:38:01 +01:00
Julius Härtl d259209bae Let jsonSerialize have a proper return type
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-03-15 15:39:30 +01:00
Max fd6395128c performance: fetch content during session creation
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-03-09 05:23:18 +00:00
Max 3e40b7bce4
fix: DAV only return workspace properties if they are set
Also fix retrieving the file for public shares as proposed by @juliushaertl.

Signed-off-by: Max <max@nextcloud.com>
2022-03-02 08:19:29 +01:00
Max d3315bf32a
fix: workspace with alternative file names
Signed-off-by: Max <max@nextcloud.com>
2022-03-02 08:19:16 +01:00
Julien Veyssier 8785d5e934
add index for last_contact in text_sessions table
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-02-03 13:58:06 +01:00
Julius Härtl 9a89308675
Fix php-cs-fixer style
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-18 10:46:47 +01:00
Julius Härtl 03a74c6654 Annotate mapper class template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-12 08:36:00 +00:00
Julien Veyssier 466a6b588d
refs #1900 fix image serving in direct editing, avoid passing empty shareToken, use the edition session to get the user ID
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-10 18:17:35 +01:00
Julien Veyssier 342952d2c6
fix some CI errors
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier f65698a7f8
use specific exception on upload error
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier e628527c8a
improve image link generation and getAttachmentNamesFromContent(), implement basic tests
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier dc92e028c2
allow image upload/link-insertion with email links and from a Talk room
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier 6ba9da8a12
safely get image mimetype
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier ef8358be6d
stream uploaded file to the storage with a resource
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier 7eaf9d661f
add check on uploaded image
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier 87944276b9
return 403 when session is invalid
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:39 +01:00
Julien Veyssier d64bb669ef
remove unused param in simpleDownload
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier 29b7e0fdf3
stop returning null in getAttachmentDirectoryForFile, use exceptions instead
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier cde5784141
fix stuff after PR comments
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier 2f23e2d18d
remove Unnecessary else
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier 9b1c396d9b
factorize getAttachmentDirectoryForFile and getOrCreateAttachmentDirectoryForFile
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier dc710f7e99
fix other stuff after PR comments
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier 3905852172
fix other stuff after PR comments
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier b4b4f1d38b
fix stuff after PR comments
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier ed2f474d53
adjustments after rebase
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:38 +01:00
Julien Veyssier 81aebeec9b
use Vuex to store current session and get it in the ImageView component
rename some variables
use session auth instead of NC auth to serve images

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier 32c0a37669
use image file name instead of file ID in content links
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier 4f54f4dee2
make image upload endpoints public and use session token to authenticate
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier 6245dd23d7
attempt to fix file copy
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier 3e68770177
small fixes
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier a2fcb4debd
fix moveAttachments in shared context (single file and directory share)
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier cb42daeba2
fix php7.3 compat
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier 551729e08d
implement auto attachment management for file deletion/move/copy
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier fc56680d96
store file id (instead of name) in markdown image links, cleanup attachments when needed
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:37 +01:00
Julien Veyssier ed48dcf164
php-cs checks
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier f3b1559f7e
psalm issues
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 4e074e7be5
address review comments
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier f1c25a83c9
fix image serve endpoints
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 94572f8cda
remove useless path attribute in insert/upload response
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 54ff44596b
add annotation
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 19d014b62d
provide preview only if mime type is supported
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 340f7883d6
avoid exposing exception msg to user
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 2f6a92b502
use attachment folder when inserting image from Files
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:36 +01:00
Julien Veyssier 65c69ffa91
change attachment folder name to .attachments.FILE_ID
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier 1b33096652
serve image previews
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier b1fe365183
provide content-type header when serving images
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier 09552deea8
check mime type on upload (client and server side)
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier 1fedc8f519
cleanup server side stuff
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier 6916b962df
add user share permissions check
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier 7fde881f84
fix share link permissions check
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:35 +01:00
Julien Veyssier f3f03cfa0d
fix upload/link-dl in single file share edition, get it from upload response
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier 761d0ddb65
public upload/link-insertion almost done, issue with missing fileId in single file share
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier 05098ce77a
serve attached images to public links
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier 849b4f0505
identify image by name instead of id in text file content
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier 7267f0b71d
display/upload/add-link works with attachment folder in user context
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier a103b98345
upload image file via Text API call for more flexibility in saved file location
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier 361f2659c4
show errors
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier 48e9828d99
loading animation when inserting image link or uploading image
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Julien Veyssier b7234c0401
insert link working
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-01-03 10:27:34 +01:00
Jonas Meurer 138d675d49
Comply to new addScript API
Required by https://github.com/nextcloud/server/pull/30015

Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-12-15 10:57:10 +01:00
Julius Härtl 1414ae5620
Additional checks for workspace controller
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-10-06 09:23:44 +02:00
Julius Härtl dea920c7a5
Add implementation hints for event listeners
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-08-16 16:06:15 +02:00
Jonas Meurer 6190837414
Make occ command return an integer as return code
As of release 4.4, `symfony/console` requires commands to return
integers: https://github.com/symfony/console/commit/cdef5a4

Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-07-27 10:33:55 +02:00
szaimen 8cdb2d22fc Extend mimetypes for direct editing
Signed-off-by: szaimen <szaimen@e.mail.de>
2021-07-20 12:38:07 +00:00
Julius Härtl b2cc6f150b
Load new entrypoint names
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-14 14:54:44 +02:00
Julius Härtl ae4a163116
Unify error responses and add logging where appropriate
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-13 22:31:33 +02:00
Julius Härtl cb37d27b21
Log exceptions that happen on unknown exception and return generic error messages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-06-29 15:21:22 +02:00
Julius Härtl 751ea299b7
Use text/plain as content type for fetching the document
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-06-28 13:38:39 +02:00
Julius Härtl be562a4132
Only return workspace property for top node in a propfind request
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-05-14 14:12:04 +02:00
Julius Härtl d532909098
Use write permission when possible
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-03-02 11:54:57 +01:00
Julius Härtl c3e20d3c58
Move to lazy registration
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-28 12:03:27 +01:00
Julius Härtl f361999126
Implement support for creating files from templates
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-28 12:03:27 +01:00
Julius Härtl 12b42d11f9
Always use the updated color depending on the guest name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-13 19:34:03 +01:00
Julius Härtl 6cca6b1aa5
Keep session information as long as we need it for steps
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-13 19:34:02 +01:00
Christoph Wurst 5d8d0c73a9
Fix dbal types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 15:21:16 +01:00
Roeland Jago Douma edbd604ebc
Fix PHP-CS
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-29 15:24:00 +01:00
Roeland Jago Douma b4963f7134
Use to correct cache to obtain version info
* The documentservice writes to the text prefix. Not the textSession
  prefix. Hence we never found any of the cache entries. Thus always
  doing all the work.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-17 12:41:13 +01:00
Julius Härtl a72e87e16d
Properly cleanup sessions when resetting a document
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-02 15:26:50 +01:00
Julius Härtl de706b4398
Catch possible database exceptions when fetching document data
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-02 15:26:50 +01:00
Joas Schilling ac2e356182 Fix typo of class name 2020-11-17 06:00:00 +00:00
Julius Härtl 8017dbb577
Add migration to fix oracle issues with the database schema
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-11-16 13:58:05 +01:00
Julius Härtl 5deeb5c61a
Do not setup appdata in constructor to avoid errors causing the whole instance to stop
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-10-01 08:20:08 +02:00
Julius Härtl 9b068d180f
Merge pull request #1026 from nextcloud/fix/1005/refresh_only_once_every_30_s 2020-09-08 16:31:12 +02:00
Roeland Jago Douma 7e30b25ec0
Refresh lastContact only once every 30 seconds
Improvements for #1005
Just storing this less often should be a bit easier on the database.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-09-07 15:05:14 +02:00
Roeland Jago Douma 5b8cbb9a52
Sessionid is an int
With the extra memcache check now this could cause issues otherwise.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-09-07 14:30:06 +02:00
Julius Härtl 70d7b3d6d5
Merge pull request #1014 from nextcloud/harden/memcachetokenfetching
Harden check when using token from memcache
2020-09-07 07:36:56 +02:00
Roeland Jago Douma 3d608de733
Harden read only check on public endpoints
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-09-06 20:54:03 +02:00
Roeland Jago Douma 57ab100044
Harden check when using token from memcache
Explicitly comparing never hurt anybody.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-09-05 10:55:09 +02:00
Julius Härtl 611fc9b701
Use proper event for loading scripts on public share links
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-04 09:36:33 +02:00
dassio da600dc39b do not return rich workspace when depth=0
Signed-off-by: dassio <dassio@icloud.com>
2020-08-31 15:35:41 +01:00
Julius Härtl 249730db58
Catch StorageNotAvailable exceptions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-28 13:34:37 +02:00
Morris Jobke 8f90092f2a
Remove unneeded dependencies
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-13 22:17:59 +02:00
Julius Härtl 7a90be554c
Also load files app scripts when user is logged in
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-13 16:12:04 +02:00
Julius Härtl ef689e8812
Use the new additional scripts event
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-13 16:11:38 +02:00
Morris Jobke 759d6799bc
Use IBootstrap for the app bootstrap
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-10 07:58:40 +02:00
Roeland Jago Douma 223a265b2e
Log the exceptions as INFO
There is no need to log them as ERROR

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-02 15:51:58 +02:00
Azul 9b413af673 fix: path for workspaces
We need the relative path inside a users home directory
to fetch the folder content for the filepicker.

$file->getPath() gets the absolute path
including username and files.

Signed-off-by: Azul <azul@riseup.net>
2020-06-22 09:40:40 +02:00
Julius Härtl f5cfa9abe6
Merge pull request #871 from nextcloud/bugfix/851
Perform file conflict check earlier so that it also triggers when not saving
2020-06-16 10:03:00 +02:00
Julius Härtl a4261e80b0
Pass path to rich workspaces
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-15 12:35:03 +02:00
Julius Härtl ff1328a695
Perform file conflict check earlier so that it also triggers when not saving
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-06-15 10:28:18 +02:00
Julius Härtl 7d6569cdf4
Return early when iterating over supported filenames
This fixes multiple files showing up on case-insensitive filenames as otherwise
the IFolder::get call creates multiple entries in the filecache for the same file

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-05-19 22:24:13 +02:00
Daniel Calviño Sánchez 1061537667 Enable Text to be used by Viewer outside Files app
Since Nextcloud 18.0.4 the Files app triggers the "LoadViewer" event, so
that event can be used to register Text with Viewer instead of doing it
through the "OCA\Files::loadAdditionalScripts" event.

Besides being more correct for the Files app it also makes possible to
use Text when opening files through Viewer in other apps, like Talk.

Note, however, that in public share pages Text is still opened using the
fallback actions instead of through Viewer, as Viewer currently does not
provide the share token of the public shared folder that contains the
file to be opened.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-04-20 15:06:47 +02:00
Julius Härtl 27c3f161f5
Merge pull request #761 from nextcloud/enh/session_memcache
Cache the session info in memcache
2020-04-07 20:09:21 +02:00
Roeland Jago Douma ae7fc42fe2
Cache the session info in memcache
This should reduce the number of queries to the DB. Esp when editing a
file with a lot of people this can really add up.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-07 14:51:21 +02:00
Julius Härtl 9691def7bc
Merge pull request #748 from nextcloud/bugfix/noid/rich-workspace-dav-available
Only return 404 for workspace property if it is not avilable
2020-04-07 13:11:25 +02:00
Julius Härtl 38a2dad5b6
Merge pull request #749 from nextcloud/bugfix/noid/translatable-readme
Use full list of supported filenames when obtaining the name to create
2020-04-03 09:41:55 +02:00
Julius Härtl 732da03d72
Use full list of supported filenames when obtaining the name to create
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-02 20:24:04 +02:00
Julius Härtl 858e412f62
Only return 404 for workspace property if it is not avilable
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-02 20:07:37 +02:00
Julius Härtl b533d449fb
Merge pull request #743 from nextcloud/bugfix/direct-editing-txt
Offer txt editing by default
2020-04-02 17:20:23 +02:00
Roeland Jago Douma d2a8ab5f3f
Add index on the oc_text_sessions table
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-02 10:39:24 +02:00
Julius Härtl bb9de8f1ad
Offer txt editing by default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-30 13:16:56 +02:00
Julius Härtl ffb417c4bf
Expose workspace_available on public shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-03-25 21:38:26 +01:00
Daniel Calviño Sánchez ba44d7b587
Send parent folder permissions along with workspace file metadata
The folder permissions are sent even if there is no workspace file for
the folder. This will make possible to disable the rich workspaces UI if
creating files is not enabled in a folder.

Rich workspaces are disabled for public share pages, so the folder
permissions are not sent in that case.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-25 21:38:26 +01:00
Julius Härtl 2ae22bba50
Use ILockingProvider
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-04 20:34:29 +01:00
Julius Härtl 478760aaeb
Add occ command to restore documents to their last saved state
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-04 20:17:01 +01:00
Julius Härtl de537819d5
Filter out duplicate version steps
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-04 19:13:50 +01:00
Julius Härtl 5fa28fc23a
Fetch steps sorted by version and id
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-04 19:13:50 +01:00
Julius Härtl 4f1d466de8
WIP: mitigate race condition when saving steps
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-02-04 19:13:49 +01:00
Julius Härtl 252296e15e
Merge pull request #608 from nextcloud/bugfix/ui-var
UI fixes for public share links
2020-01-28 20:24:22 +01:00
Roeland Jago Douma 74117d916e
Catch the exception when a user no longer exists
Else this could result in a lot of log spam.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-27 13:12:25 +01:00
Julius Härtl 92df34121d
Use string as a filename
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-27 12:54:46 +01:00
Julius Härtl cb70e3aaa4
Rename document creator (fixes #599)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-24 12:51:15 +01:00
Julius Härtl 3f039ba999
Use a proper value for checking if workspaces are available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-21 09:59:38 +01:00
Julius Härtl d9555335e2 Fix editing plain text files with direct editing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-16 12:09:04 +01:00
Julius Härtl 936225d69d
Do not try obtaining the file by id when a share link is used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-14 15:24:08 +01:00
Julius Härtl 7218cdc2f6
Properly handle file deletion and temporary service unavailability
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-01-09 18:51:36 +01:00
Christoph Wurst 43c0277375
Fix calling setLastContact on boolean
Fixes https://sentry.io/share/issue/e2f18ccec8ea44cf8cfe1dbfa703c802/

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-09 11:37:32 +01:00
Julius Härtl 7f423caf8c
DoumentId should be a string when using as a filename
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-20 14:30:15 +01:00
Julius Härtl f73faa70cd
Remove dot from direct editing file extension
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-17 08:00:09 +01:00
Julius Härtl 61297bdd83
Use file path instead of folder for direct workspace opening
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-16 15:53:04 +01:00
Roeland Jago Douma 9002e73e03
Merge pull request #451 from nextcloud/bugfix/noid/use-filepath
Use file path to obtain workspace direct editing links
2019-12-11 11:17:35 +01:00
Daniel Kesselberg e28117bd46 Fix Undefined variable: initialStateService
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-12-07 22:23:13 +01:00
Julius Härtl d40f1b8437
Fix public share links
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-06 15:02:50 +01:00
Julius Härtl 797e29ccf9
Persist setting for rich workspace
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-06 14:09:18 +01:00
Julius Härtl 561f24933a
Use file path to obtain workspace direct editing links
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-04 18:53:46 +01:00
Julius Härtl 6a3b6018d2
Use DI for direct editing token handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:31 +01:00
Julius Härtl c87396aa85
Remove template creator
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:31 +01:00
Julius Härtl c1e009c77b
Move to POST
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:31 +01:00
Julius Härtl 9d645c8010
Add mimetype to creators
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:31 +01:00
Julius Härtl 1e5f5e3ff0
Fix undefined variable
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:31 +01:00
Julius Härtl a6bd99213f
Add direct editing endpoint for workspaces
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:30 +01:00
Julius Härtl baa11f4063
Start with direct editing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-02 12:28:30 +01:00
Julius Härtl da1ef87690
Use translatable readme.md name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-18 14:08:05 +01:00
Julius Härtl d9e5efbf47
Add dav plugin for rich workspaces
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-18 12:44:40 +01:00
Julius Härtl 45490a60c0
Add workspace route and public page handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-04 19:35:11 +01:00
ovk 4a56df9061 Reduce 'Removed X inactive sessions' severity to debug
Signed-off-by: ovk <koshelnikov@gmail.com>
2019-10-23 20:40:27 -04:00
Roeland Jago Douma b63d8b35e7
Throw proper NotFoundException if a file is not found by id
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-03 15:35:59 +02:00
Julius Härtl f200199926
Fix version checks
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-08-07 10:11:51 +02:00
Julius Härtl db39d359d9
Adjust autosave delay
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-08-06 10:05:46 +02:00