Commit Graph

63 Commits

Author SHA1 Message Date
GretaD fce716b905
Fix languages empty array
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-05-08 10:03:58 +02:00
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst 2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
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>
2019-11-22 20:52:10 +01:00
Christoph Wurst de6940352a Move settings to an app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-09-28 09:39:28 +00:00
Roeland Jago Douma 3cc3b0f0d8
Update tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-09 13:57:04 +02:00
Arthur Schiwon 99075825e3
changes the returned key from UserID to id, in accordance with getUserData
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-21 16:38:25 +02:00
Arthur Schiwon 29449f85b6
uses "yes" and "no" for config switch over stringified numbers
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-21 10:22:12 +02:00
Arthur Schiwon bbe2f2535a
makes users management page aware of the introduced options
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-19 17:04:35 +02:00
Arthur Schiwon 5b754a6353
extends Provisioning API with optional userid and required email
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-19 17:02:28 +02:00
Arthur Schiwon 45110f4c5d
fixes misunderstanding of the error message
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-05-16 14:31:10 +02:00
Julius Härtl add43bc19c
Check if password can be changed for the users backend in OCS api
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-03-05 13:44:25 +01:00
Roeland Jago Douma 15abcff2a1
Expose subadmin to OCP
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-01-29 20:47:35 +01:00
Arthur Schiwon 505722cc0d
do not offer to change display name or password, if not possible.
Fixes #12319

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-11-07 22:37:41 +01:00
zulan cf266ee004 Get l10n within NewUserMailHelper to ensure it always uses the new user's language.
Some related tests had to be changed because they relied on internals, see also from the PHPUnit documentation:
"Exercise caution when using [the at] matcher as it can lead to brittle tests which are too closely tied to specific implementation details."

Signed-off-by: Zulan <git@zulan.net>
2018-10-15 19:01:46 +02:00
Daniel Calviño Sánchez 36326e38a0 Add optional "displayName" parameter to add user endpoint
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-31 13:33:55 +02:00
Georg Ehrke 3ffeb4ae06
fix tests / mistakes made during rebase
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-06-27 21:52:04 +02:00
Thomas Citharel 4a9f8623b5
Fix review & tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-06-27 13:19:21 +02:00
John Molakvoæ (skjnldsv) f0ce44fedf
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-15 16:51:53 +02:00
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
John Molakvoæ (skjnldsv) 3e5ea9b0a9
Return proper boolean user enabled state api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-04-16 15:17:02 +02:00
Roeland Jago Douma a8d4b0688e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-11 00:30:14 +02:00
John Molakvoæ (skjnldsv) 8b9bd37e4e
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-04-09 15:13:11 +02:00
John Molakvoæ (skjnldsv) 762002ec2e
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-04-05 17:11:41 +02:00
John Molakvoæ (skjnldsv) 68ae4394f7
Api, return users details by groups
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-04-05 17:08:59 +02:00
John Molakvoæ (skjnldsv) 41b690ed53
Allow admin to create users withoutpassword by sending mail automatically
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-22 15:06:04 +01:00
John Molakvoæ (skjnldsv) 24659342f5
fixup! Check if groups is array, return empty do not throw
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-19 15:12:32 +01:00
John Molakvoæ (skjnldsv) f5137fef6c
Fixed tests and improved code
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-16 11:44:20 +01:00
Roeland Jago Douma fbeaacdf1b
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-27 22:03:40 +01:00
Roeland Jago Douma 119896a8d7
Fix tests
* Add factory for the federatedfilesharing app

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-26 12:49:11 +01:00
Morris Jobke 2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-23 10:57:21 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Arthur Schiwon a62b4a68a0
throw 101 when an empty group string is provided
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-18 10:56:13 +02:00
Roeland Jago Douma 6d4731024a
Some app fixes of phpstorm inspections
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 11:42:07 +02:00
Joas Schilling fa717d9706
Add unit tests for the new code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-21 12:21:21 +02:00
Joas Schilling 7816c54625
Allow to force a language and set it via the ocs api
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-21 11:34:52 +02:00
Joas Schilling 0e26ba4c2a
Don't allow the user to set fields they can't see
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-02 10:09:42 +02:00
Joas Schilling 7a87fedac3
Remove dead arguments
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-24 10:18:14 +02:00
Joas Schilling e19126425b
Fix similar issues with the group id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-24 10:15:03 +02:00
Joas Schilling 992c48c89b
Fix the storage info and other checks when the user has wrong casing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-24 10:10:50 +02:00
Morris Jobke 4dd72e9eb9
Use RESPOND_NOT_FOUND for non existing user
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-21 11:30:00 -05:00
Lukas Reschke 280a075c9c
Adjust class references
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-11 17:35:59 +02:00
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>
2017-04-09 21:43:01 -05:00