Skip to content

Commit

Permalink
Merge pull request #6 from OS2Forms/feature/FORMS-984-add-config
Browse files Browse the repository at this point in the history
FORMS-984: Added missing configuration for new endpoint
  • Loading branch information
jekuaitk authored Oct 24, 2023
2 parents 4b5c31b + c06061f commit 32fa7c1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ about writing changes to this log.

## [Unreleased]

## [2.0.1]

- Updated module config with new list submissions endpoint

## [2.0.0]

- Added endpoint for getting all submissions on a webform.
- **Updated** permissions such that users must be given access explicitly.

Expand All @@ -22,6 +28,8 @@ about writing changes to this log.

- Release 1.0.0

[Unreleased]: https://github.com/OS2Forms/os2forms_rest_api/compare/1.1.0...HEAD
[Unreleased]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.0.1...HEAD
[2.0.1]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/OS2Forms/os2forms_rest_api/compare/1.1.0...2.0.0
[1.1.0]: https://github.com/OS2Forms/os2forms_rest_api/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/OS2Forms/os2forms_rest_api//releases/tag/1.0.0
21 changes: 21 additions & 0 deletions config/install/rest.resource.webform_rest_form_submissions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
langcode: da
status: true
dependencies:
module:
- key_auth
- os2forms_rest_api
- serialization
- webform_rest
enforced:
module:
- os2forms_rest_api
id: webform_rest_form_submissions
plugin_id: webform_rest_form_submissions
granularity: resource
configuration:
methods:
- GET
formats:
- json
authentication:
- key_auth
2 changes: 2 additions & 0 deletions config/install/user.role.os2forms_rest_api_user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- rest.resource.webform_rest_elements
- rest.resource.webform_rest_fields
- rest.resource.webform_rest_form_submissions
- rest.resource.webform_rest_submission
module:
- key_auth
Expand All @@ -19,5 +20,6 @@ is_admin: null
permissions:
- 'restful get webform_rest_elements'
- 'restful get webform_rest_fields'
- 'restful get webform_rest_form_submissions'
- 'restful get webform_rest_submission'
- 'use key authentication'
13 changes: 13 additions & 0 deletions os2forms_rest_api.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

/**
* @file
* Install, update and uninstall functions for the OS2Forms REST API module.
*/

/**
* Install module config.
*/
function os2forms_rest_api_update_9001(): void {
\Drupal::service('config.installer')->installDefaultConfig('module', 'os2forms_rest_api');
}

0 comments on commit 32fa7c1

Please sign in to comment.