Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Creating a user via graph Api #107

Merged
merged 4 commits into from
Apr 27, 2022
Merged

Creating a user via graph Api #107

merged 4 commits into from
Apr 27, 2022

Conversation

ScharfViktor
Copy link
Contributor

@ScharfViktor ScharfViktor commented Apr 26, 2022

To unlock CI in ocis (webUITest failed), I need to switch the methods user creation in midleware:

Given user "Alice" has been created with default attributes and without skeleton files in the server
and
Given these users have been created with default attributes and without skeleton files in the server:
to graphApi

How tested:

  • start ocis with idm by default - branch [full-ci] Switch default config from account/glauth to builtin libregraph/idm ocis#3331
  • start middleware with IDM variable: BACKEND_HOST=https://localhost:9200 NODE_TLS_REJECT_UNAUTHORIZED=0 RUN_ON_OCIS=true TEST_WITH_GRAPH_API yarn start
  • init middleware: curl -XPOST http://localhost:3000/init
  • try to create user "Alice": curl -XPOST http://localhost:3000/execute -d '{"step": "Given user \"Alice\" has been created with default attributes and without skeleton files"}' -H "Content-Type: application/json"

Result: Alice should be created: curl -k -u admin:admin https://localhost:9200/graph/v1.0/users/Alice

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

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

looks mostly good to me
I've build a docker image with this code and pushed it to arturneumann/owncloud-test-middleware:latest
Here a PR that tries it owncloud/web#6814

src/config.js Outdated Show resolved Hide resolved
src/helpers/graphHelper.js Outdated Show resolved Hide resolved
@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Apr 27, 2022

I've rebased the PR and fixed the lint problems. we recently did lint updates in the repo, so you may have to do rm -rf node_modules && yarn to get the updated dependencies. cc @ScharfViktor

@ScharfViktor ScharfViktor requested a review from rhafer April 27, 2022 13:48
@ScharfViktor ScharfViktor marked this pull request as ready for review April 27, 2022 13:50
@ScharfViktor
Copy link
Contributor Author

looks mostly good to me I've build a docker image with this code and pushed it to arturneumann/owncloud-test-middleware:latest Here a PR that tries it owncloud/web#6814

thanks for advise))

@ScharfViktor
Copy link
Contributor Author

I ran the ocis CI with my docker image and everything was successful. https://drone.owncloud.com/owncloud/ocis/11003

CI in ocis is now waiting for a new version middleware

Copy link

@rhafer rhafer left a comment

Choose a reason for hiding this comment

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

Nice work. lgtm

@pascalwengerter
Copy link
Contributor

I'll go ahead and merge this one and #109 and then release a new version of the middleware

@pascalwengerter pascalwengerter merged commit 10cd296 into main Apr 27, 2022
@delete-merged-branch delete-merged-branch bot deleted the createUserViaGraphApi branch April 27, 2022 14:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants