Commit Graph

39 Commits (c0474ba3644fc94674788bf21dd3e22d564e019c)

Author SHA1 Message Date
Julius Härtl c0474ba364
Use product name in places where it is appropriate rather than the instance name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Vincent Petry 278a73789e
Map old account scope properties to new names
Use new scope values in settings page.
Adjust all consumers to use the new constants.
Map old scope values to new ones in account property getter.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Morris Jobke 0390a90d70
Return correct error message on share download without read permission
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
John Molakvoæ (skjnldsv) 6adb19b296
Show filename on share link download
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
4 years ago
Julius Härtl 217a69ebf9
Add BeforeTemplateRenderedEvent for files_sharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
4 years ago
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>
4 years ago
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling 1c4422ca3d
Add a test and fix the existing ones
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma 260892eb3b
Disable link shares of disabled users
Fixes #10869

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
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>
5 years ago
Daniel Calviño Sánchez 5c7c308220 Include the share in the Files_Sharing::loadAdditionalScripts event
This provides a better context for apps using the event, for example to
load one script or another depending on whether the share is a file or a
folder.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
5 years ago
John Molakvoæ (skjnldsv) 1deda8fd65
Rollback to default list view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
Morris Jobke 463dfb50d9
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Michael Weimann c572c669e5
Adapts the code to the new master state
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
6 years ago
Michael Weimann 16f379b974
Hides the header actions for file drops
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
6 years ago
John Molakvoæ (skjnldsv) cac2f7f4d6
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
Daniel Calviño Sánchez bfb2a914d2 Honour "hide download" in the public share page
When the "hide download" property of a share is set the public share
page will not show the download button nor the menu with the download,
direct link and "Add to your Nextcloud" actions; the "downloadURL"
hidden field will not be included either in the generated HTML.

Despite that, note that the "downloadURL" parameter is still set and
passed to the template, as this could be needed anyway to generate
previews (for example, of audio files).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
6 years ago
Roeland Jago Douma c237a3f003 Expose hide download to public page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Bjoern Schiessle 660b5d1af6
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
6 years ago
Roeland Jago Douma 9f658febca
Fix ShareControllerTest
* Removed tests that are now handled by the middleware
* Updated tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Julius Härtl 1624762d2f
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 years ago
John Molakvoæ (skjnldsv) 3824e6f631
fixup! fixup! Sharing: redirect to download after authentification if requested
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
John Molakvoæ (skjnldsv) 7bcc821642
fixup! Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
John Molakvoæ (skjnldsv) 8c69d783e0
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
Julius Härtl 4a1cbefc90
Fix files_sharing tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 years ago
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke ab36980d20
Use ::class in test mocks of dav app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Roeland Jago Douma 05c37526a7
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Lukas Reschke 727688ebd9
Adjust existing bruteforce protection code
- Moves code to annotation
- Adds the `throttle()` call on the responses on existing annotations

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
Morris Jobke 5b4adf66e5
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values:
  OCP\Defaults or OC_Defaults (which is extended by
  OCA\Theming\ThemingDefaults)
* our code used a mixture of both of them, which made
  it hard to work on theme values
* this extended the public interface with the missing
  methods and uses them everywhere to only rely on the
  public interface

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Roeland Jago Douma f589f1a1d6
Move files_sharing Controllers => Controller
lib/Controller is the default location for controllers. So lets put them
all in there.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago