skjnldsv
8bed23288b
fix(files_sharing): dark avatar support
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 year ago
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2 years ago
Arthur Schiwon
b3b6f2d581
fix Controller tests
- added pageTitle in code was missing in expectations
- fixed warnings of superflouos parameter
- fixed wrong type of mock
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
3 years ago
Carl Schwan
b70c6a128f
Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
4 years ago
Joas Schilling
6dd60b6d30
Only allow avatars in 64 and 512 pixel size
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Côme Chilliet
8b271b8a12
Fix tests and avoid PHP errors in them
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Joas Schilling
c2bef528ef
Remove unused members and imports
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
a4b2403e29
The privacy setting is only about syncing to other servers
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 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
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Daniel Kesselberg
68148f4073
Always use status 200 for avatar response
As discussed in #18603 caching a 201 response is hard. It's now possible to distinguish between generated and uploaded avatars by reading the X-NC-IsCustomAvatar (0 = generated, 1 = uploaded) header.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
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
ef4b59d341
More fixes
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
Roeland Jago Douma
54eb27dab2
Update tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Michael Weimann
bf1253cb49
Implement guest avatar endpoint
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
7 years ago
Joas Schilling
38fffffe18
Fix unit test
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
John Molakvoæ (skjnldsv)
156da29cea
Avatar imagick bump
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
John Molakvoæ (skjnldsv)
eea6f74ca4
Controller tests fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
8 years ago
Roeland Jago Douma
8e8fe6b8eb
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Morris Jobke
43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
8 years ago
Joas Schilling
0aff1c9268
Return the user id in case of an error
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Joas Schilling
656e3f7a24
Check the mimetype before reading the content and catch exception
Signed-off-by: Joas Schilling <coding@schilljs.com>
9 years ago
Roeland Jago Douma
6a85882f61
Fix tests
9 years ago
Roeland Jago Douma
b1a090f357
AvatarController use proper JSONResponse
* Do not rely on DataResponse magic. We want JSON so use JSON
* Fix tests
9 years ago
Roeland Jago Douma
2f03853fb9
AvatarController cleanup
* Use all DI components
* Let the AppFramework resolve the AvatarController
* Update unit tests
* Unit tests no longer require DB
9 years ago
Roeland Jago Douma
87ac72d004
We have to mock the is_uploaded_file in the OC\Core\Controller namespace
9 years ago
Roeland Jago Douma
09f4ce4389
Fix mock call in AvatarControllerTest
9 years ago
Joas Schilling
392bc0c6b9
Move tests/core/ to PSR-4
10 years ago
Roeland Jago Douma
b9b19cef41
Fix avatar controller tests
10 years ago
Morris Jobke
b97fe97875
move avatar controller to core/controller
10 years ago
Roeland Jago Douma
186e35d954
Verify the path is a file on avatar update
Fixes #21533
Before we just assumed that the passed path was a file. This does not
have to be the case. Thus check if it actually is a file before doing
any more tests.
10 years ago
Roeland Jago Douma
3e80f14269
[Avatar] Make the avatar controller use the avatar node
10 years ago
Scrutinizer Auto-Fixer
453e1bf66e
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
10 years ago
Thomas Müller
757aa45db7
Adding more DB groups to test suits
Adding more DB groups to test suits
10 years ago
Roeland Jago Douma
fee6847f48
[Avatar] No need to setup FS for avatar tests
10 years ago
Lukas Reschke
abdbf10ebc
Do not print exception message
In case of an error the error message often contains sensitive data such as the full path which potentially leads to a full path disclosure.
Thus the error message should not directly get displayed to the user and instead be logged.
10 years ago
Thomas Müller
a446b43bcc
Revert "Allow Remote avatars"
10 years ago
Roeland Jago Douma
ae62537adf
Allow remote avatars
10 years ago
Roeland Jago Douma
65cf4028cc
Move avatarcontroller towards Node Api
11 years ago
Morris Jobke
e184157684
[avatar] add error handlers for avatar setup
add colon to translated string
use placeholder in t()
Adding a size limitation for avatar upload
Unit test for file size
Fix typo & display server side error message
10 years ago
Lukas Reschke
21d261885d
Fix test
11 years ago
Robin Appelman
724f88d9ff
fix tests
11 years ago
Joas Schilling
30357aaac0
No user no avatar easy as that
11 years ago
Joas Schilling
61ec37431a
Fix order of expected and actual on assertEquals() calls
11 years ago
Joas Schilling
8304f5f508
Fix getting the avatar of a non-existing user
11 years ago
Roeland Jago Douma
3560b32dfc
Fix the avatarcontroller cache needing the cache dir
This was removed in 82254ad5ef and
unfortunatly missed by jenkins before mering into master.
11 years ago