Commit Graph

208 Commits

Author SHA1 Message Date
Christoph Wurst 8e370bbf28
Refactor provision api app's UserControllerTest
* Replace deprecated getMock with createMock
* Use createMock consistently
* Use php's ::class references

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-02-28 10:40:49 +01:00
Bjoern Schiessle 2ca8339d01
add groups to user info output
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-02-09 16:23:10 +01:00
Bjoern Schiessle 3e6c40eeb4
make sure that 'getCurrentUser' gets an array in order to manipulate the data to match the old API
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-26 11:31:08 +01:00
Bjoern Schiessle 5086335643
unify endpoints form core and the the provisioning api
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-25 11:20:35 +01:00
Bjoern Schiessle fee42647fb
add data from the users profile to the provisioning api
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-24 14:23:18 +01:00
Joas Schilling 5d1f7e5a7b
Allow subadmins to add people to groups via provisioning api
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-18 14:34:38 +01:00
Joas Schilling d80a4453af
Make sure subadmins can not delete users from their last subadmin group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-18 11:56:24 +01:00
Joas Schilling ae77067a07
No need to check the subadmin again
The user needs to be a subadmin of the group,
otherwise they are not allowed to remove anyone from the group

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-18 11:43:52 +01:00
Roeland Jago Douma e13affa29d
Adds provisioning middleware tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-30 14:12:10 +01:00
Joas Schilling edec1fafe7
Update app versions and requirements
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-13 20:41:55 +01:00
Joas Schilling bea85adc08
Require sudo mode on the provisioning API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-05 11:55:21 +01:00
Lukas Reschke bc1008ac38
Use 11.0 instead 9.2
As discussed we're changing the version from 9.2 to 11.0 to make some more sense.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-15 14:45:58 +01:00
Lukas Reschke 32cf661215
Use new appstore API
This change introduces the new appstore API in Nextcloud.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:44 +01:00
Joas Schilling 0d878f94e6
Add unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-21 09:59:34 +02:00
Joas Schilling 0b1fb180a5
Make AppConfig part of the public API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-21 09:09:23 +02:00
skjnldsv 71830b285c Svgo optimization
Signed-off-by: John Molakvoæ <fremulon@protonmail.com>
2016-09-27 20:56:26 +02:00
Morris Jobke 77cfc8bfb2
add viewBox to app icon for proper scaling in Firefox 2016-08-17 18:38:53 +02:00
Joas Schilling 04c5259df0
Allow to retrieve the quota itself via the provisioning api 2016-08-17 10:41:13 +02:00
Roeland Jago Douma 092b767ef9
Move Apps to OCSController 2016-08-14 18:34:07 +02:00
Roeland Jago Douma 8f4adebab7
Move Users to OCSController 2016-08-14 18:34:02 +02:00
Roeland Jago Douma 432e7c93c6
Move Groups over to OCSController
* Take advantage of the AppFramework
* Fix tests
2016-08-14 18:34:01 +02:00
Roeland Jago Douma 0fdeefe47c
Add ProvisioningAPI middleware
The provisioning API has 3 access levels:

* Admin
* SubAdmin
* User

This middleware adds a check for the SubAdmin part.
2016-08-14 18:34:01 +02:00
Joas Schilling dae6432ae7
Increment the versions and adjust the capitilization 2016-08-08 16:45:40 +02:00
Joas Schilling 7400ff05ac
Also increase the min version 2016-07-22 14:46:52 +02:00
Robin Appelman 6062b6365b bumb compatible app versions for core apps 2016-07-22 13:04:23 +02:00
Joas Schilling 03cb588ea9 Merge pull request #500 from nextcloud/bump_version
Bump version
2016-07-22 10:03:42 +02:00
Joas Schilling 813f0a0f40
Fix apps/ 2016-07-21 18:13:57 +02:00
Joas Schilling 86129a8b88
Increase app versions 2016-07-21 15:50:30 +02:00
Roeland Jago Douma f9e0e3d972
Fix Warnings Provisioning API
* OC_OCS_Result is deprecated
* getMock is deprecated in phpunit 5.4
2016-07-12 08:53:12 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Joas Schilling 2a05035339 Move Provisioning api to PSR-4 (#24510)
* Move app to PSR-4

* Fix setUp method

* Fix the tests
2016-05-11 19:38:49 +02:00
Thomas Müller 8486926a14
Add provisioning api to enable and disable users 2016-05-02 09:31:22 +02:00
Joas Schilling 8885cb1eb9 Increase all versions on master which is now 9.1 2016-03-02 08:53:42 +01:00
Lukas Reschke c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Arthur Schiwon d19c47a381 More fixed tests :) 2016-02-09 18:11:30 +01:00
Arthur Schiwon 3a796d1e15 Consolidate getQuota and setQuota methods in User instance 2016-02-09 17:16:43 +01:00
Thomas Müller aeb89947a2 Introduce IUser::setEMailAddress and add hook mechanism 2016-01-20 14:57:20 +01:00
Joas Schilling 0461b9dbb9 Add a new app type that can not be enabled for groups 2016-01-14 15:45:47 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Tom Needham 3327857c1a Update log message when error occurs during addGroup 2016-01-08 13:35:00 +01:00
Roeland Jago Douma 1af3bca720 Fix provisioning API unit test 2016-01-08 13:35:00 +01:00
Tom Needham 673a8a1e4a Remove unnecessary group name validation 2016-01-08 13:35:00 +01:00
Joas Schilling ae285c0654 Remove deprecated shipped flag from info.xml which has no use anymore 2016-01-07 15:15:58 +01:00
Joas Schilling 40f786060e Add ownCloud min and max version for shipped apps 2016-01-07 15:11:49 +01:00
Lukas Reschke 88c7face07 Inject OCSClient
Fixes https://github.com/owncloud/core/issues/21451
2016-01-06 11:40:22 +01:00
Joas Schilling 5453daab03 More fixes to the docs 2015-12-08 09:11:50 +01:00
Scrutinizer Auto-Fixer 0f1be1b601 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 20:08:20 +00:00
Thomas Müller eebe2b9c23 User IUser::getEMailAddress() all over the place 2015-12-02 21:25:05 +01:00
Thomas Müller 757aa45db7 Adding more DB groups to test suits
Adding more DB groups to test suits
2015-11-30 10:55:06 +01:00
Roeland Jago Douma 6dcaac7e2c Return empty list if group does not have subadmins
Instead of throwing an error just return an empty list. Since that is
actually what it is.

Fixes #19789
2015-11-16 22:24:53 +01:00
Thomas Müller 5ec64c4fd7 Merge pull request #20292 from owncloud/provisioning_api_group_unittest
Moved grouptest over to pure unit tests
2015-11-16 18:00:03 +01:00
Roeland Jago Douma 61425b7621 Moved grouptest over to pure unit tests 2015-11-16 14:40:01 +01:00
Roeland Jago Douma fc1f0233ff Added unit test for new functionality 2015-11-12 22:31:17 +01:00
michag86 3b88c469c7 enable api addUser for subadmins
* Fix existing unit tests
2015-11-12 22:31:17 +01:00
Joas Schilling 960c9f386d Revert OCS error code change from #20135 2015-11-05 17:01:47 +01:00
Thomas Müller 73d9699be9 Merge pull request #20135 from owncloud/check-if-null-subadmin
Drop OC_SubAdmin and replace usages
2015-10-29 17:07:45 +01:00
Lukas Reschke c6f6a8758b Drop OC_SubAdmin and replace usages 2015-10-29 11:31:18 +01:00
Joas Schilling 16e3f4de07 Kill empty app.php in provisioning_api 2015-10-29 11:08:39 +01:00
Lukas Reschke 8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Roeland Jago Douma 9b64fa7b92 [provisioning api] losen test
Since we have no control of how backends sort their list of users and we
also don't want to sort yet another time the test now just checks if the
correct number of elements is returned and if they are from the list of
group members.
2015-10-21 20:05:14 +02:00
Roeland Jago Douma aeffd51145 Fix scrutinizer issues
* PHPDoc
* Proper array initialization
2015-10-20 21:47:37 +02:00
Thomas Müller 60abc2738b Merge pull request #18399 from owncloud/api-getusers-for-subadmins
enable api getUsers for subadmins
2015-10-20 14:28:31 +02:00
Thomas Müller 5752e3b3c0 Merge pull request #19666 from owncloud/fix_13002
Combine OCS API getUser method code into provisioning_api app
2015-10-20 11:10:39 +02:00
Joas Schilling 0d3d75b3b3 Increase the 2nd digit of shipped apps 2015-10-17 08:47:11 +02:00
Roeland Jago Douma 002e9c76cd Combine OCS API getUser method code into provisioning_api app
Fixes #13002

Move the cloud/users/{userid} code in total to the provisioning API.
2015-10-13 21:07:48 +02:00
michag86 23db51f69a Merge branch 'master' into api-getusers-for-subadmins 2015-10-13 14:40:22 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Lukas Reschke a7f132a964 Add proper PHPDoc
Makes my IDE happier when going through that file.
2015-09-08 14:02:30 +02:00
Roeland Jago Douma ef3aa1218e [provisioning api] Updated tests
* Test pass again
* Code coverage getUsers is at 100% again
2015-08-26 11:00:13 +02:00
michag86 e958638221 enable api getUsers for subadmins
Now subadmins can get a list of users they are subadmins of.
2015-08-26 11:00:13 +02:00
Roeland Jago Douma b41bccd385 Check for userSession->getUser() === null 2015-08-11 15:37:06 +02:00
Roeland Jago Douma b25c3beb2f [provisioning api] Fix grouptest 2015-08-11 15:22:59 +02:00
Roeland Jago Douma 2148120883 [provisioning api] Test for correct displayname 2015-08-11 13:01:37 +02:00
Roeland Jago Douma 4bffe393e9 Declare fields 2015-08-11 12:51:00 +02:00
Roeland Jago Douma 934f98b592 [provisioning api] Improve apps test coverage 2015-08-11 12:47:57 +02:00
Roeland Jago Douma ed1f034e6b Fix groups 2015-08-11 12:47:42 +02:00
Roeland Jago Douma 96949649f0 [provisioning api] improve coverage for groups 2015-08-11 11:47:01 +02:00
Roeland Jago Douma 867f5136c2 [provisioning api] Improve test coverage user 2015-08-11 11:08:57 +02:00
Roeland Jago Douma 98a7e42ebb [provisioning api] Move away from OC\Util to OCP\Util 2015-08-02 10:27:36 +02:00
Roeland Jago Douma cea72c47f9 [provisioning_api] Move tests to OCP 2015-08-02 10:22:26 +02:00
Roeland Jago Douma a4822f9f9a [provisioning_api] Move part of apps to OCP 2015-08-02 10:22:26 +02:00
Roeland Jago Douma 97d79202ac [provisioning_api] OC_User to IUserSession 2015-08-02 10:22:26 +02:00
Roeland Jago Douma 9f59add9ed [provisioning_api] subadmin check for users 2015-08-02 10:22:26 +02:00
Roeland Jago Douma b745e75737 [provisioning_api] Moved groups away from static stuff 2015-08-02 10:22:26 +02:00
Roeland Jago Douma abca7737b7 [provisioning_api] Move users away from static code 2015-08-02 10:22:26 +02:00
Morris Jobke 044d2ece07 Merge pull request #15506 from rullzer/core_apps_oc_log2ocp_util
Move core apps from OC_Log::write to OCP\Util
2015-07-01 08:53:16 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Thomas Müller 6d97dfb00c Catch NotFoundException and return no quota information which simply reflects the current state - no file storage has been initialized for the user. 2015-05-19 12:38:03 +02:00
Vincent Petry 5899b7b6ea Fix provisioning API unit tests for login
Properly login the user every time to make sure their FS is properly
setup.
2015-05-18 12:28:54 +02:00
Roeland Jago Douma 7a8072e958 Move core apps from OC_Log::write to OCP\Util 2015-05-18 10:57:52 +02:00
Thomas Müller 15d134124b Validate the quota value to be a correct value 2015-05-07 17:56:13 +02:00
Joas Schilling 3f3f8c2f99 Fix usage of deprecated private constants 2015-04-18 10:30:02 +02:00
Roeland Jago Douma b21dc35355 Do not try to make user subadmin of group twice
If the provisioning api is used to make a user subadmin of a group that user
is already a subadmin just return success.

Added unit test to ensure things keep working.
2015-04-13 11:42:56 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Joas Schilling fe8df31fa5 Sort the array to be sure 2015-02-26 09:13:09 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Thomas Müller f60406102f disallow provisioning api to be enabled for groups only 2015-01-29 10:00:54 +01:00
Jan-Christoph Borchardt 7624b395f2 add icon for Provisioning API 2015-01-16 14:43:14 +01:00
Joas Schilling fb37b3c687 Extend Test\TestCase and do not use uniqid() 2015-01-07 10:34:42 +01:00
Tom Needham f17f0ade7f Remove unnecessary setUp method 2015-01-04 23:10:44 +00:00
Tom Needham a20de1548d Add proper group setup and teardown to all provisioning_api tests 2015-01-03 15:58:36 +00:00
Tom Needham 5c0d7f2ee5 Create admin group before running provisioning_api tests 2015-01-03 15:39:42 +00:00
Tom Needham 97d31946c3 Ensure admin group is present before running tests 2015-01-03 13:25:48 +00:00
Tom Needham 32d9563359 Change array element order to fix failing test 2015-01-02 19:07:31 +00:00
Tom Needham a4f270a9ce Add placeholder app.php for provisioning_api so app is detected 2015-01-02 18:52:11 +00:00
Tom Needham dc85c20b18 Add provisioning_api app
enable unit tests for provisioning api

fix admin docu key
2014-12-24 22:15:20 +01:00