Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated permissions schema to match microservice #53

Merged
merged 1 commit into from
Jan 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Libraries_API.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,14 @@
"\n",
"Specify that the request is a POST method by adding `-X POST` to your request. You must include a payload, passed via the `-d` flag, in JSON format. Add this header to your request to indicate your payload is in the appropriate format: `-H \"Content-Type: application/json\"`. The payload must include:\n",
" * email: (string) specifies which user's permissions to be modified\n",
" * permission: (string) 'read', 'write', 'admin' or 'owner'\n",
" * value: (boolean) whether the user has this permission (true=yes, false=no)\n",
" * permission: (dict) specifies the permissions type and whether the user has this permission\n",
" - allowed keys: (string) 'read', 'write', or 'admin'\n",
" - allowed values: (boolean) whether the user has this permission (true=yes, false=no)\n",
"\n",
"There is no response to the request.\n",
"\n",
"Note: An email will be sent to the affected user upon a successful permissions change.\n",
"\n",
"*Permissions*:\n",
"The following type of user can update a permission for a user for a given library:\n",
" - owner\n",
Expand All @@ -809,7 +812,7 @@
" Dload Upload Total Spent Left Speed\n",
"\r",
" 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\r",
"100 81 100 3 100 78 3 78 0:00:01 --:--:-- 0:00:01 465\n"
"100 67 100 3 100 64 3 64 0:00:01 --:--:-- 0:00:01 179\n"
]
}
],
Expand All @@ -820,7 +823,7 @@
"curl -H \"Authorization: Bearer $token\" -H \"Content-Type: application/json\" \\\n",
" https://api.adsabs.harvard.edu/v1/biblib/permissions/hHGU1Ef-TpacAhicI3J8kQ \\\n",
" -X POST \\\n",
" -d '{\"email\":\"test.user@example.email.com\", \"permission\":\"read\", \"value\": true}'"
" -d '{\"email\":\"test.user-api@example.email.com\", \"permission\": {\"read\": true}}'"
]
},
{
Expand All @@ -838,6 +841,8 @@
"\n",
"There is no response to the request.\n",
"\n",
"Note: An email will be sent to the affected user upon a successful permissions change.\n",
"\n",
"*Permissions*:\n",
"The following type of user can transfer libraries:\n",
" - owner"
Expand Down