Skip to content

Commit

Permalink
feat: adjusted permissions and added native build support (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored Mar 22, 2024
1 parent 5e21808 commit 53533df
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ on:
jobs:
branch:
uses: onecx/ci-quarkus/.github/workflows/build-branch.yml@v1
secrets: inherit
secrets: inherit
with:
native: true
4 changes: 3 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ on:
jobs:
pr:
uses: onecx/ci-quarkus/.github/workflows/build-pr.yml@v1
secrets: inherit
secrets: inherit
with:
native: true
4 changes: 3 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ on:
jobs:
release:
uses: onecx/ci-quarkus/.github/workflows/build-release.yml@v1
secrets: inherit
secrets: inherit
with:
native: true
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ jobs:
uses: onecx/ci-quarkus/.github/workflows/build.yml@v1
secrets: inherit
with:
native: true
helmEventTargetRepository: onecx/onecx-welcome
2 changes: 1 addition & 1 deletion src/main/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ app:
enabled: true
spec:
permissions:
welcome:
image:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
18 changes: 9 additions & 9 deletions src/main/openapi/onecx-welcome-bff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ paths:
get:
x-onecx:
permissions:
welcome:
image:
- read
tags:
- imagesInternal
Expand All @@ -38,7 +38,7 @@ paths:
put:
x-onecx:
permissions:
welcome:
image:
- write
tags:
- imagesInternal
Expand Down Expand Up @@ -68,7 +68,7 @@ paths:
delete:
x-onecx:
permissions:
welcome:
image:
- delete
tags:
- imagesInternal
Expand All @@ -85,7 +85,7 @@ paths:
post:
x-onecx:
permissions:
welcome:
image:
- write
tags:
- imagesInternal
Expand Down Expand Up @@ -113,7 +113,7 @@ paths:
get:
x-onecx:
permissions:
welcome:
image:
- read
tags:
- imagesInternal
Expand All @@ -132,7 +132,7 @@ paths:
post:
x-onecx:
permissions:
welcome:
image:
- write
tags:
- imagesInternal
Expand All @@ -157,7 +157,7 @@ paths:
post:
x-onecx:
permissions:
welcome:
image:
- write
tags:
- imagesInternal
Expand Down Expand Up @@ -194,7 +194,7 @@ paths:
get:
x-onecx:
permissions:
welcome:
image:
- read
tags:
- imagesInternal
Expand All @@ -214,7 +214,7 @@ paths:
put:
x-onecx:
permissions:
welcome:
image:
- write
tags:
- imagesInternal
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ quarkus.openapi-generator.codegen.spec.onecx_welcome_internal_yaml.base-package=
quarkus.openapi-generator.codegen.spec.onecx_welcome_internal_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_welcome_internal_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_welcome_internal_yaml.type-mappings.File=byte[]

quarkus.openapi-generator.codegen.spec.onecx_welcome_internal_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi

# INTEGRATION TEST
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/mockserver/permissions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"json": {
"appId": "onecx-welcome-bff",
"permissions": {
"welcome": ["read", "write", "delete"],
"image": ["read", "write", "delete"],
"permissions": ["admin-write","admin-read"]
}
},
Expand All @@ -35,7 +35,7 @@
"json": {
"appId": "onecx-welcome-bff",
"permissions": {
"welcome": ["read"],
"image": ["read"],
"permissions": ["admin-write","admin-read"]
}
},
Expand Down

0 comments on commit 53533df

Please sign in to comment.