Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Enable/Disable a user documentation missing in User Provisioning API #4079

Closed
paurakhsharma opened this issue Apr 24, 2018 · 19 comments
Closed
Assignees
Labels

Comments

@paurakhsharma
Copy link
Contributor

Enable/Disable a user endpoints are missing in the documentation.

@phil-davis
Copy link
Contributor

There are commented-out acceptance tests that supposedly use these endpoints. But when the test scenario is enabled, actually there is no code underneath it. We need to see if the endpoints actually exist in the provisioning API source code.

@settermjd
Copy link
Contributor

Thanks for following this up @phil-davis and for creating the issue @paurakhsharma. I'll chase this up.

@settermjd
Copy link
Contributor

@phil-davis, can you point me to the correct tests?

@phil-davis
Copy link
Contributor

phil-davis commented Apr 25, 2018

The tests were commented out. When I went looking this morning, I could not find any code/endpoints in the provisioning app that look like they are for enable/disable of apps.

The scenarios were in provisioning-v1.feature

#	Scenario: enable an app
#		Given app "comments" is disabled
#		When user "admin" sends HTTP method "POST" to API endpoint "/cloud/apps/comments"
#		Then the OCS status code should be "100"
#		And the HTTP status code should be "200"
#		And app "comments" is enabled
#
#	Scenario: disable an app
#		Given app "comments" is enabled
#		When user "admin" sends HTTP method "DELETE" to API endpoint "/cloud/apps/comments"
#		Then the OCS status code should be "100"
#		And the HTTP status code should be "200"
#		And app "comments" is disabled

@DeepDiver1975 or @PVince81 any idea if the provisioning app was going to support (or does support) enable/disable of apps?

Edit: sorry for the confusion!!! This comment is about enable/disable of apps, which is documented, and now there are acceptance tests that work... But this issue is about enable/disable of users. So my comment here is confusing rubbish.

@settermjd
Copy link
Contributor

Thanks @phil-davis. There seems to be a unit test that supports the functionality.

settermjd added a commit that referenced this issue Apr 25, 2018
After looking at the documentation, it was clear that it needed quite a
bit of love to bring it up to the current standard. This commit changes
headers, makes the endpoints and their arguments clearer, by storing
them in tables, converts the existing examples to curl console examples,
and a few other changes. This relates to #4079.
@settermjd
Copy link
Contributor

Are tests/acceptance/features/apiProvisioning/{enable,disable}User.feature related?

@paurakhsharma
Copy link
Contributor Author

paurakhsharma commented Apr 27, 2018

@settermjd Yes thats the test for this feature but documentation is missing it.
This feature file has now been moved to

tests/acceptance/features/apiProvisioning-v1/enableUser.feature
tests/acceptance/features/apiProvisioning-v1/disableUser.feature

and for v2

tests/acceptance/features/apiProvisioning-v2/enableUser.feature
tests/acceptance/features/apiProvisioning-v2/disableUser.feature

@settermjd
Copy link
Contributor

Awesome. Leave it with me to do a bit more research and I'll get it documented.

settermjd added a commit that referenced this issue Apr 30, 2018
After looking at the documentation, it was clear that it needed quite a
bit of love to bring it up to the current standard. This commit changes
headers, makes the endpoints and their arguments clearer, by storing
them in tables, converts the existing examples to curl console examples,
and a few other changes. This relates to #4079.
settermjd added a commit that referenced this issue Apr 30, 2018
After looking at the documentation, it was clear that it needed quite a
bit of love to bring it up to the current standard. This commit changes
headers, makes the endpoints and their arguments clearer, by storing
them in tables, converts the existing examples to curl console examples,
and a few other changes. This relates to #4079.
@settermjd settermjd added the WIP label Apr 30, 2018
@settermjd settermjd self-assigned this Apr 30, 2018
settermjd added a commit that referenced this issue May 2, 2018
After looking at the documentation, it was clear that it needed quite a
bit of love to bring it up to the current standard. This commit changes
headers, makes the endpoints and their arguments clearer, by storing
them in tables, converts the existing examples to curl console examples,
and a few other changes. This relates to #4079.
settermjd added a commit that referenced this issue May 8, 2018
After looking at the documentation, it was clear that it needed quite a
bit of love to bring it up to the current standard. This commit changes
headers, makes the endpoints and their arguments clearer, by storing
them in tables, converts the existing examples to curl console examples,
and a few other changes. This relates to #4079.
@voroyam
Copy link
Contributor

voroyam commented Jun 18, 2018

Is this done?

can we close this?

@phil-davis
Copy link
Contributor

phil-davis commented Jun 18, 2018

Yes, the current 10.0.* doc has the sections about how to enable and disable an app.
I checked for the wrong thing - checking again...

@phil-davis
Copy link
Contributor

No, I do not see anything about enable and disable a user. This still needs to be added.

@phil-davis phil-davis reopened this Jun 18, 2018
@settermjd settermjd removed their assignment Jul 2, 2018
@voroyam
Copy link
Contributor

voroyam commented Jul 5, 2018

Last change on this issue was 17 Days ago, no one is assign. No one created a PR.

please provice more information @phil-davis @paurakhsharma

I don't know what User Provisioning API is or where "enable and disable a user" should be added.

@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2018

I looked found the original PR that introduces the command: owncloud/core#23844 and confirmed locally:

Enable user: curl -X PUT -u admin:admin http://localhost/owncloud/ocs/v1.php/cloud/users/user1/enable
Disable user: curl -X PUT -u admin:admin http://localhost/owncloud/ocs/v1.php/cloud/users/user1/disable

@voroyam would that be enough info to start with ?

@phil-davis
Copy link
Contributor

And the feature files mentioned above by @paurakhsharma have working acceptance tests that enable and disable users.
I can write this up - just need to prioritize it among the current testing fun.

@phil-davis phil-davis self-assigned this Jul 5, 2018
@PVince81
Copy link
Contributor

PVince81 commented Jul 5, 2018

I think not everyone is able to read the code from the Matrix acceptance tests or core and infer commands, so it help sometimes to post more info. :-)

@phil-davis
Copy link
Contributor

Indeed - although in PHPstorm I can right-click Goto->Implementation on the step text of a feature file and it will take me straight to the method/function that implements the step. If you keep drilling down, eventually something makes a real call to the API 😄

@voroyam
Copy link
Contributor

voroyam commented Jul 5, 2018

That would imply that I have and know PHPStorm :)

I am just the substitute docs guy.

@PVince81 yes, those commands are a good start. I just need to fill in the blanks.

@phil-davis
Copy link
Contributor

PR #4249 to review

@phil-davis
Copy link
Contributor

PR is merged, closing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants