Author: Viktor Scharf <scharf.vi@gmail.com>
Date:   Wed May 18 12:43:12 2022 +0200

    beta-plan docs: change method creating user (#3822)
This commit is contained in:
Viktor Scharf committed 2022-05-18 10:49:48 +00:00
1 parent f739fb992b
commit 62d2cd05c3
9 files changed
+12 -13

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "ocis.messages.search.v0"
url: /grpc_apis/ocis_messages_search_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "ocis.messages.settings.v0"
url: /grpc_apis/ocis_messages_settings_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "ocis.messages.store.v0"
url: /grpc_apis/ocis_messages_store_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
@@ -1,7 +1,7 @@
---
title: "ocis.messages.thumbnails.v0"
url: /grpc_apis/ocis_messages_thumbnails_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "ocis.services.search.v0"
url: /grpc_apis/ocis_services_search_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "ocis.services.settings.v0"
url: /grpc_apis/ocis_services_settings_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: "ocis.services.store.v0"
url: /grpc_apis/ocis_services_store_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
@@ -1,7 +1,7 @@
---
title: "ocis.services.thumbnails.v0"
url: /grpc_apis/ocis_services_thumbnails_v0
date: 2022-05-18T09:40:53Z
date: 2022-05-18T10:48:45Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
+4 -5
View File
@@ -104,11 +104,10 @@ SHARE_API_PATH=ocs/v2.php/apps/files_sharing/api/v1/shares
USER=admin
PASSWORD=admin
```
- create a new user `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/users -d '{"displayName": "<display name>", "mail": "<mail-address>", "onPremisesSamAccountName": "<username>", "passwordProfile":{ "password": "<password>" }}'`
- give the user the "Admin" role
1. get the id of the admin role `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/settings/roles-list -d"{}" | jq '.bundles[] | select (.name | test("admin")) | .id'`
2. get the id of the user: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/users/<username>" | jq '.id'`
3. assign role user to role: `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/settings/assignments-add -d'{"account_uuid":"<user-id>","role_id":"<admin-role-id>"}`
- create a new user `curl -k -u $USER:$PASSWORD "$SERVER_URI/$GRAPH_API_PATH/users" -X POST -d'{"displayName":"Example User","mail":"example@example.org","onPremisesSamAccountName":"example","passwordProfile":{"password":"ThePassword"}}'`
- give the user the "Space Admin" role
1. get the id of the user: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/users/<user-name> | jq '.id'`
2. assign role user to role: `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/settings/assignments-add -d'{"account_uuid":"<user-id>","role_id":"2aadd357-682c-406b-8874-293091995fdd"}`
- create a space: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$GRAPH_API_PATH/drives" -X POST -d'{"Name":"Space for finance","driveType":"project", "description":"we need some space"}'`
- list spaces: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/me/drives`
- disable a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X DELETE`