Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit 16d27b5

Browse files
author
Mateu Aguiló Bosch
committed
feat: remove useless permission
See: https://www.drupal.org/node/2984034
1 parent 98e65ff commit 16d27b5

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

config/sync/user.role.anonymous.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ weight: 0
77
is_admin: false
88
permissions:
99
- 'access content'
10-
- 'access jsonapi resource list'
1110
- 'access openapi api docs'
1211
- 'access toolbar'
1312
- 'execute graphql requests'

config/sync/user.role.authenticated.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ weight: 1
77
is_admin: false
88
permissions:
99
- 'access content'
10-
- 'access jsonapi resource list'
1110
- 'access openapi api docs'
1211
- 'access toolbar'
1312
- 'issue subrequests'

scripts/ci/travis/tests/contenta_ci_tests_helper.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ setup_anonymous_user() {
2020

2121
cd $DRUPAL_BASE
2222
# Add Permission to anonymous user
23-
$DRUSH role-add-perm 'anonymous' 'access jsonapi resource list' -y
2423
$DRUSH updatedb -y
2524
$DRUSH cr -y
2625

tests/src/Functional/InstallationTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,23 @@ public function testRpcMethod() {
9393
$this->assertEquals('/api', $output['result']['openApi']['basePath']);
9494
}
9595

96+
public function testJsonApiEntryPoint() {
97+
$response = $this->httpClient->request(
98+
'GET',
99+
$this->baseUrl . '/api',
100+
[
101+
'query' => [
102+
'query' => '{"jsonrpc":"2.0","method":"jsonapi.metadata","id":"cms-meta"}'
103+
],
104+
'headers' => ['Accept' => 'application/vnd.api+json'],
105+
]);
106+
$this->assertSame(200, $response->getStatusCode());
107+
$body = $response->getBody()->getContents();
108+
$output = Json::decode($body);
109+
$this->assertArrayHasKey('self', $output);
110+
$this->assertArrayHasKey('node--recipe', $output);
111+
}
112+
113+
public function testOpenApi() {}
114+
96115
}

0 commit comments

Comments
 (0)