Commit Graph

219 Commits

Author SHA1 Message Date
Joas Schilling 03b467bd23
Also check implementsAction method
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 15:28:02 +02:00
Joas Schilling f67a10e8d0
Only return display name as editable when the user backend allows it
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 15:01:30 +02:00
Joas Schilling 2f99ae1120
Also check the default phone region when the number has no country code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-31 08:45:32 +02:00
Vincent Petry 00d83a5db0
Capability for federated scope
Added additional capability in the provisioning API to signal whether
the federation scope values can be used.

This is based on whether the lookup server upload is enabled or not.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 16:54:47 +01:00
Vincent Petry aac7b52c66
Change account property capability
Include version number in capability

Signed-off-by: Vincent Petry <vincent@nextcloud.com>

Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
2021-03-26 13:07:10 +01:00
Vincent Petry b66af8a432
Add capability for editable scopes in provisioning API
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:09 +01:00
Vincent Petry 2a312fe4e3
Expose avatarScope through provisioning API
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:09 +01:00
Vincent Petry 266a6fb5f8
OCS allow reading and writing account property scopes
Extends the provisioning API to allow a user to get and set their own
account property scopes.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:08 +01:00
Vincent Petry 5d14fd4396
Make extra user profile fields always editable
The fields for phone number, address, website and twitter are now
editable regardless whether federated sharing and the lookup server
are enabled or not.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:08 +01:00
Joas Schilling 5c3551cf2f
Only clear known users when we had at least one phonebook entry
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-12 09:04:13 +01:00
Joas Schilling 61ed57b757
Rename some parameters and methods to make the API more clear
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 20:30:29 +01:00
Joas Schilling c7be18c0d6
Add a service to find out if a user knows another user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 17:19:55 +01:00
Joas Schilling 7baefcfc74
Delete matches when the user is being deleted
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 15:05:49 +01:00
Joas Schilling 55a5d26c56
Delete matches when a user changes their phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 15:05:48 +01:00
Joas Schilling f62d9b50fd
Store when a user knows another user based on phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 15:05:48 +01:00
Joas Schilling a1e5090b3f
Fix some psalm warnings
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 13:02:08 +01:00
Roeland Jago Douma e5b1d59dfd Provisioning API to IBootstrap
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-10 09:39:47 +01:00
Roeland Jago Douma 128b682b7c Fixed error after merge in UsersController
This was moved to the LoggerInterface so the recent merge of #25589
broke master.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-05 09:14:01 +01:00
Roeland Jago Douma 4a9f3ef232
Merge pull request #25589 from nextcloud/provisioning-api-invalid-argument
forward invalid argument message to frontend when creating a user fails
2021-03-05 08:59:50 +01:00
Roeland Jago Douma cc744740b7 Remove deprecated \OCP\API
Time to remove this forgood now.
Remaining constant moved over
The world is a tiny bit better

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-03 20:54:32 +01:00
Roeland Jago Douma dc7eb2bd85 LoggerInterface for provisioning API Controllers
Sweep swoop swaap swuup
away with the deprecated stuff

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-02 21:46:51 +01:00
Joas Schilling 89d2eaca0a
Cleanup appinfo usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-02-16 15:51:25 +01:00
Robin Appelman c6ce1eb557
forward invalid argument message to frontend when creating a user fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-02-11 17:05:51 +01:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Joas Schilling d0750df20c
Unit tests for searching by phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling f648635758
Make the throwing optional, so background tasks don't break
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling 9e04e6f99a
Also translate the phone number when coming in via the accounts manager API directly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling fe9c46e595
Add an endpoint to search for accounts based on phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Joas Schilling da9462b482
Make code strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Morris Jobke 482b42c4a7
Merge pull request #22891 from nextcloud/techdebt/18680/improve-ProvisioningApiMiddleware-service-logic
Improve registerService logic for ProvisioningApiMiddleware for static code analysis
2020-10-05 21:50:50 +02:00
Morris Jobke 0f7fb7cb4e
Merge pull request #23189 from nextcloud/enhancement/cs/binary_operator_spaces
Format code to a single space around binary operators
2020-10-05 21:31:38 +02:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Sujith Haridasan 62923a5e1e Fix the user email issue while creating a user
When the user is created, the provisioning api
was not adding the email address of the user
when provided if the `send email to new user`
is not set.

Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
2020-10-05 16:47:57 +05:30
Daniel Kesselberg 46f04106e6
Improve registerService logic for ProvisioningApiMiddleware for static code analysis
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-16 16:58:15 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Daniel Kesselberg c19bdb05e8
Generate password on addUser by password_policy app
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-09 18:38:19 +02:00
Morris Jobke 7e281a07bb
Use IBootstrap for the app federatedfilesharing
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-14 16:34:43 +02:00
Joas Schilling db8267db26
Use the new method everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-03 10:59:43 +02:00
GretaD fce716b905
Fix languages empty array
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-05-08 10:03:58 +02:00
Joas Schilling 5b5550dbba
Merge pull request #20677 from nextcloud/followup/17718/scaling-user-provisioning
Scaling user provisioning for subadmins with many groups
2020-04-30 12:49:57 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Mikael Hammarin 6ffde74928
Patch to optimize for large installations (>5000 users >20000 groups) where subadmins have access to many of groups (>250)
- UsersController:editUser() calls isUserAccessible() even if the user is admin

This fix reduces API calls to editUser (ex change locale/display name) from >2 minutes (!) to ~3 seconds per call in average.

Signed-off-by: Mikael Hammarin <mikael@try2.se>
2020-04-25 14:37:46 +02:00
Julius Härtl e7249de145
Make the groupId url encoded
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-11 08:28:15 +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 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +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 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +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 b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00