From 47f1de1d2b5a3a7d70cd7b3dbf94f5e333ad6ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henry=20T=C3=A4schner?= <129834483+HenryT-CG@users.noreply.github.com> Date: Sat, 13 Jul 2024 09:24:35 +0200 Subject: [PATCH] Add permission for reading workspaces (#50) * add permission for reading workspaces * fix permission setup for test --- .../pages/onecx-announcement-bff-docs.adoc | 6 ++++-- src/main/helm/values.yaml | 6 ++++-- src/main/openapi/openapi-bff.yaml | 2 +- src/test/resources/mockserver/permissions.json | 2 ++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/modules/onecx-announcement-bff/pages/onecx-announcement-bff-docs.adoc b/docs/modules/onecx-announcement-bff/pages/onecx-announcement-bff-docs.adoc index 5cfe0af..9429267 100644 --- a/docs/modules/onecx-announcement-bff/pages/onecx-announcement-bff-docs.adoc +++ b/docs/modules/onecx-announcement-bff/pages/onecx-announcement-bff-docs.adoc @@ -72,11 +72,13 @@ app: spec: permissions: announcement: - read: permission on all GET requests and POST search + read: permission on all GET requests and POST search including assigned meta data write: permission on PUT, POST, PATCH requests, where objects are saved or updated delete: permission on all DELETE requests product: - read: permission on all GET requests and POST search + read: permission to read available products/applications + workspace: + read: permission to read available workspaces keycloak: client: enabled: true diff --git a/src/main/helm/values.yaml b/src/main/helm/values.yaml index 0e5a3bb..edce117 100644 --- a/src/main/helm/values.yaml +++ b/src/main/helm/values.yaml @@ -9,11 +9,13 @@ app: spec: permissions: announcement: - read: permission on all GET requests and POST search + read: permission on all GET requests and POST search including assigned meta data write: permission on PUT, POST, PATCH requests, where objects are saved or updated delete: permission on all DELETE requests product: - read: permission on all GET requests and POST search + read: permission to read available products/applications + workspace: + read: permission to read available workspaces keycloak: client: enabled: true diff --git a/src/main/openapi/openapi-bff.yaml b/src/main/openapi/openapi-bff.yaml index 48f2598..b4f3005 100644 --- a/src/main/openapi/openapi-bff.yaml +++ b/src/main/openapi/openapi-bff.yaml @@ -197,7 +197,7 @@ paths: get: x-onecx: permissions: - announcement: + workspace: - read tags: - AnnouncementInternal diff --git a/src/test/resources/mockserver/permissions.json b/src/test/resources/mockserver/permissions.json index 7afa20c..a4a27a7 100644 --- a/src/test/resources/mockserver/permissions.json +++ b/src/test/resources/mockserver/permissions.json @@ -21,6 +21,7 @@ "delete" ], "product": ["read"], + "workspace": ["read"], "permissions": [ "admin-write", "admin-read" @@ -51,6 +52,7 @@ "read" ], "product": ["read"], + "workspace": ["read"], "permissions": [ "admin-write", "admin-read"