Skip to content

enable api getUsers for subadmins - #18399

Merged
DeepDiver1975 merged 3 commits into
masterfrom
api-getusers-for-subadmins
Oct 20, 2015
Merged

enable api getUsers for subadmins#18399
DeepDiver1975 merged 3 commits into
masterfrom
api-getusers-for-subadmins

Conversation

@michag86

Copy link
Copy Markdown
Contributor

Make it possible to use getUsers from provisioning api for subadmins.

Comment thread apps/provisioning_api/lib/users.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please put the statement on a new line.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Beside my comments this looks good.

@MorrisJobke

Copy link
Copy Markdown
Contributor

cc @DeepDiver1975 Provisioning API + SubAdmin ❓

@MorrisJobke

Copy link
Copy Markdown
Contributor

cc @tomneedham

Comment thread apps/provisioning_api/lib/users.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No... I just spend some time to get rid of most of the OC_* calls in the provisioning api.

Just use a simple loop and use $this->groupManager->displayNamesInGroups

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rullzer But if I use this in a loop than limit and offset are not used as expected. If the subadmin uses limit=2 and has two groups to manage he gets 4 results.

@rullzer

rullzer commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

Please fix the test case
And add new test cases

@rullzer

rullzer commented Aug 18, 2015

Copy link
Copy Markdown
Contributor

Addition does make a lot of sense! Thanks @michag86.

@MorrisJobke

Copy link
Copy Markdown
Contributor

@rullzer The OC_Subadmin stuff isn't available in any proper implementation 😢

@rullzer

rullzer commented Aug 19, 2015

Copy link
Copy Markdown
Contributor

@rullzer The OC_Subadmin stuff isn't available in any proper implementation 😢

Well that is known. But the provisioning API is already using the calls currently. So I do not really see an issue with that. It is far from ideal, I admit that.

@rullzer
rullzer force-pushed the api-getusers-for-subadmins branch 2 times, most recently from 4acbfb5 to 15b5107 Compare August 19, 2015 08:47
@rullzer

rullzer commented Aug 19, 2015

Copy link
Copy Markdown
Contributor

Rebased and squashed.

@rullzer

rullzer commented Aug 19, 2015

Copy link
Copy Markdown
Contributor

Issue for displayNamesInGroups in #18418

@MorrisJobke MorrisJobke added this to the 8.2-current milestone Aug 19, 2015
michag86 and others added 2 commits August 26, 2015 11:00
Now subadmins can get a list of users they are subadmins of.
* Test pass again
* Code coverage getUsers is at 100% again
@rullzer
rullzer force-pushed the api-getusers-for-subadmins branch from 15b5107 to ef3aa12 Compare August 26, 2015 09:02
@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@ghost

ghost commented Aug 26, 2015

Copy link
Copy Markdown

🚀 Test PASSed.🚀
chuck

@rullzer

rullzer commented Aug 27, 2015

Copy link
Copy Markdown
Contributor

So oracle is fine now.

Let the reviews begin!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already done by the API::SUBADMIN_AUTH?

@MorrisJobke

Copy link
Copy Markdown
Contributor

Tested and works 👍

CURL command: curl http://test:test@localhost/master/ocs/v1.php/cloud/users

@PVince81

Copy link
Copy Markdown
Contributor

We're already past feature freeze unfortunately.

@MTRichards @cmonteroluque can we get this useful addition get scheduled for 9.0 ?

@MTRichards MTRichards modified the milestones: 9.0-next, 8.2-current Sep 18, 2015
@MTRichards

Copy link
Copy Markdown
Contributor

Will link it for consideration

@PVince81

Copy link
Copy Markdown
Contributor

CC @SergioBertolinSG for additional provisioning API API-level tests

@PVince81

Copy link
Copy Markdown
Contributor

Tested, works 👍

@DeepDiver1975

Copy link
Copy Markdown
Member

@SergioBertolinSG please add an integration test to test this behavior - THX

DeepDiver1975 added a commit that referenced this pull request Oct 20, 2015
@DeepDiver1975
DeepDiver1975 merged commit 60abc27 into master Oct 20, 2015
@DeepDiver1975
DeepDiver1975 deleted the api-getusers-for-subadmins branch October 20, 2015 12:28
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants