Skip to content

Commit 6bb6cc9

Browse files
committed
Added initial config
1 parent cfa526b commit 6bb6cc9

7 files changed

+117
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ api users.
1010

1111
A user can access the REST API if
1212

13-
1. it has the “API user” (`api_user`) role and
13+
1. it has the “OS2Form REST API user” (`os2forms_rest_api_user`) role and
1414
2. has a generated key (User > Edit > Key authentication; `/user/«user
1515
id»/key-auth`).
1616

17-
The “API user” role gives read-only access to the API. To get read access, a
18-
user must also have the “API user (write)” (`api_user_write`) role.
17+
The “OS2Form REST API user” role gives read-only access to the API. To get read
18+
access, a user must also have the “OS2Form REST API user (write)”
19+
(`os2forms_rest_api_user_write`) role.
1920

2021
## Endpoints
2122

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
uuid: dd2cd98d-f423-4a2e-8460-d5a5ace4792b
2+
langcode: da
3+
status: true
4+
dependencies:
5+
config:
6+
- user.role.os2forms_rest_api_user
7+
module:
8+
- os2forms_rest_api
9+
- user
10+
enforced:
11+
module:
12+
- os2forms_rest_api
13+
id: user_add_role_action.os2forms_rest_api_user
14+
label: 'Add the OS2Form REST API user role to the selected user(s)'
15+
type: user
16+
plugin: user_add_role_action
17+
configuration:
18+
rid: os2forms_rest_api_user
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
uuid: 4936f0e2-a947-4f18-91a8-5213114ac7b9
2+
langcode: da
3+
status: true
4+
dependencies:
5+
config:
6+
- user.role.os2forms_rest_api_user_write
7+
module:
8+
- user
9+
- os2forms_rest_api
10+
enforced:
11+
module:
12+
- os2forms_rest_api
13+
id: user_add_role_action.os2forms_rest_api_user_write
14+
label: 'Add the OS2Form REST API user (write) role to the selected user(s)'
15+
type: user
16+
plugin: user_add_role_action
17+
configuration:
18+
rid: os2forms_rest_api_user_write
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
uuid: e015ec9c-0ed8-497e-a3fa-358810c36f33
2+
langcode: da
3+
status: true
4+
dependencies:
5+
config:
6+
- user.role.os2forms_rest_api_user
7+
module:
8+
- user
9+
- os2forms_rest_api
10+
enforced:
11+
module:
12+
- os2forms_rest_api
13+
id: user_remove_role_action.os2forms_rest_api_user
14+
label: 'Remove the OS2Form REST API user role from the selected user(s)'
15+
type: user
16+
plugin: user_remove_role_action
17+
configuration:
18+
rid: os2forms_rest_api_user
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
uuid: c68c0ee2-6a2b-4484-b466-125e7d0bd292
2+
langcode: da
3+
status: true
4+
dependencies:
5+
config:
6+
- user.role.os2forms_rest_api_user_write
7+
module:
8+
- user
9+
- os2forms_rest_api
10+
enforced:
11+
module:
12+
- os2forms_rest_api
13+
id: user_remove_role_action.os2forms_rest_api_user_write
14+
label: 'Remove the OS2Form REST API user (write) role from the selected user(s)'
15+
type: user
16+
plugin: user_remove_role_action
17+
configuration:
18+
rid: os2forms_rest_api_user_write
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
langcode: en
2+
status: true
3+
dependencies:
4+
config:
5+
- rest.resource.webform_rest_elements
6+
- rest.resource.webform_rest_fields
7+
- rest.resource.webform_rest_submission
8+
module:
9+
- key_auth
10+
- os2forms_rest_api
11+
- rest
12+
enforced:
13+
module:
14+
- os2forms_rest_api
15+
id: os2forms_rest_api_user
16+
label: 'OS2Form REST API user'
17+
weight: 1
18+
is_admin: null
19+
permissions:
20+
- 'restful get webform_rest_elements'
21+
- 'restful get webform_rest_fields'
22+
- 'restful get webform_rest_submission'
23+
- 'use key authentication'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
langcode: en
2+
status: true
3+
dependencies:
4+
config:
5+
- rest.resource.webform_rest_submit
6+
module:
7+
- key_auth
8+
- os2forms_rest_api
9+
- rest
10+
enforced:
11+
module:
12+
- os2forms_rest_api
13+
id: os2forms_rest_api_user_write
14+
label: 'OS2Form REST API (write)'
15+
weight: 2
16+
is_admin: null
17+
permissions:
18+
- 'restful post webform_rest_submit'

0 commit comments

Comments
 (0)