Julius Härtl
217a69ebf9
Add BeforeTemplateRenderedEvent for files_sharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 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>
6 years ago
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Joas Schilling
1c4422ca3d
Add a test and fix the existing ones
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Roeland Jago Douma
260892eb3b
Disable link shares of disabled users
Fixes #10869
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 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>
6 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>
6 years ago
John Molakvoæ (skjnldsv)
1deda8fd65
Rollback to default list view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
7 years ago
Morris Jobke
463dfb50d9
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Michael Weimann
c572c669e5
Adapts the code to the new master state
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
7 years ago
Michael Weimann
16f379b974
Hides the header actions for file drops
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
7 years ago
John Molakvoæ (skjnldsv)
cac2f7f4d6
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
7 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>
7 years ago
Roeland Jago Douma
c237a3f003
Expose hide download to public page
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Bjoern Schiessle
660b5d1af6
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
8 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>
8 years ago
Julius Härtl
1624762d2f
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
8 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>
8 years ago
John Molakvoæ (skjnldsv)
7bcc821642
fixup! Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
8c69d783e0
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
Julius Härtl
4a1cbefc90
Fix files_sharing tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
8 years ago
Morris Jobke
31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
ab36980d20
Use ::class in test mocks of dav app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Morris Jobke
43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Roeland Jago Douma
05c37526a7
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 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>
9 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>
9 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>
9 years ago
Roeland Jago Douma
7792902808
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
9 years ago
Thomas Müller
e0d919bbfc
Adding Open Graph Support for public shares http://ogp.me/
In case no preview is available we display the ownCloud logo
Fix unit test
10 years ago
Lukas Reschke
268c5a0aa0
Adjust test
10 years ago
Joas Schilling
0215b004da
Update with robin
10 years ago
Joas Schilling
813f0a0f40
Fix apps/
10 years ago
Roeland Jago Douma
1c5e082ee1
Add eventdispatcher to public link view
10 years ago
Roeland Jago Douma
db559e33be
Fix PHPUnit 5.4 warnings in files_sharing tests
10 years ago
Lukas Reschke
c268ad1597
Add PHP unit test
10 years ago
Bjoern Schiessle
bb54ab0db8
add hide file list option
10 years ago
Lukas Reschke
aba539703c
Update license headers
10 years ago
Joas Schilling
3f0b2d148d
Move tests to PSR-4
10 years ago
Joas Schilling
25f3110730
Fix ShareControllerTest ( #24824 )
10 years ago
Björn Schießle
e10105474f
move federated sharing settings to the federatedfilesharing app
10 years ago
Lukas Reschke
933f60e314
Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
10 years ago
Robin Appelman
acd8c72d3d
add tests
10 years ago
Roeland Jago Douma
359c62d90e
Fix unit tests
10 years ago