Skip to content

Commit

Permalink
Add modulePermissions to timers in module descriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
bvsharp committed Nov 9, 2023
1 parent 913719a commit 24ce61a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
22 changes: 14 additions & 8 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
"methods": ["GET"],
"pathPattern": "/entity-types/{entity-type-id}/columns/{column-name}/values",
"permissionsRequired": ["fqm.entityTypes.item.columnValues.get"]
},
{
"methods": ["POST"],
"pathPattern": "/entity-types/materialized-views/refresh",
"permissionsRequired": ["fqm.materializedViews.post"]
}
]
},
Expand Down Expand Up @@ -78,11 +83,6 @@
"methods": ["DELETE"],
"pathPattern": "/query/{query-id}",
"permissionsRequired": ["fqm.query.async.delete"]
},
{
"methods": ["POST"],
"pathPattern": "/materialized-views/refresh",
"permissionsRequired": ["fqm.materializedViews.post"]
}
]
},
Expand All @@ -95,13 +95,19 @@
"methods": ["POST"],
"pathPattern": "/query/purge",
"unit": "hour",
"delay": "1"
"delay": "1",
"modulePermissions": [
"fqm.query.purge"
]
},
{
"methods": ["POST"],
"pathPattern": "/materialized-views/refresh",
"pathPattern": "/entity-types/materialized-views/refresh",
"unit": "hour",
"delay": "24"
"delay": "24",
"modulePermissions": [
"fqm.materializedViews.post"
]
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/swagger.api/mod-fqm-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ paths:
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/materialized-views/refresh:
/entity-types/materialized-views/refresh:
post:
operationId: refreshMaterializedViews
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MaterializedViewRefreshControllerTest {
@Test
void refreshMaterializedViewsTest() throws Exception {
String tenantId = "tenant_01";
RequestBuilder requestBuilder = MockMvcRequestBuilders.post("/materialized-views/refresh")
RequestBuilder requestBuilder = MockMvcRequestBuilders.post("/entity-types/materialized-views/refresh")
.header(XOkapiHeaders.TENANT, tenantId)
.contentType(APPLICATION_JSON);
when(executionContext.getTenantId()).thenReturn(tenantId);
Expand Down

0 comments on commit 24ce61a

Please sign in to comment.