From f53c6b8638a3f4e67e2b13d90acc6c2c5397241b Mon Sep 17 00:00:00 2001 From: JordenReuter <149687553+JordenReuter@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:35:25 +0200 Subject: [PATCH] feat: adjusted permission (#67) * feat: adjusted permission * fix: api * feat: update docs --- .../pages/onecx-user-profile-bff-docs.adoc | 3 +- .../onecx-user-profile-bff-extensions.adoc | 34 +++++++++---------- src/main/helm/values.yaml | 2 +- src/main/openapi/openapi-bff.yaml | 34 +++++++++---------- .../resources/mockserver/permissions.json | 4 +-- 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-docs.adoc b/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-docs.adoc index b7145f5..52c961a 100644 --- a/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-docs.adoc +++ b/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-docs.adoc @@ -68,7 +68,7 @@ app: enabled: true spec: permissions: - user-profile: + userProfile: 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 @@ -80,3 +80,4 @@ app: defaultClientScopes: [ ocx-up:all, ocx-pm:read ] ---- + diff --git a/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-extensions.adoc b/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-extensions.adoc index d74fbe3..215b94b 100644 --- a/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-extensions.adoc +++ b/docs/modules/onecx-user-profile-bff/pages/onecx-user-profile-bff-extensions.adoc @@ -47,32 +47,32 @@ h| Version | tkit-quarkus-log-cdi | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link] +| 2.36.0 | tkit-quarkus-log-rs | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link] +| 2.36.0 | tkit-quarkus-log-json | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link] +| 2.36.0 | tkit-quarkus-rest | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link] +| 2.36.0 | tkit-quarkus-jpa | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link] +| 2.36.0 | quarkus-hibernate-validator @@ -83,14 +83,14 @@ h| Version | tkit-quarkus-rest-context | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest-context.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link] +| 2.36.0 | onecx-permissions | https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-permissions.html[Link] -| https://github.com/onecx/onecx-quarkus/blob/0.31.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link] -| 0.31.0 +| https://github.com/onecx/onecx-quarkus/blob/0.32.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link] +| 0.32.0 | quarkus-oidc @@ -101,14 +101,14 @@ h| Version | tkit-quarkus-security | https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link] -| https://github.com/1000kit/tkit-quarkus/blob/2.33.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link] -| 2.33.0 +| https://github.com/1000kit/tkit-quarkus/blob/2.36.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link] +| 2.36.0 | onecx-core | https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link] | -| 0.31.0 +| 0.32.0 | quarkus-micrometer-registry-prometheus diff --git a/src/main/helm/values.yaml b/src/main/helm/values.yaml index 6586398..63ee805 100644 --- a/src/main/helm/values.yaml +++ b/src/main/helm/values.yaml @@ -9,7 +9,7 @@ app: enabled: true spec: permissions: - user-profile: + userProfile: 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 diff --git a/src/main/openapi/openapi-bff.yaml b/src/main/openapi/openapi-bff.yaml index d254799..fa4ef27 100644 --- a/src/main/openapi/openapi-bff.yaml +++ b/src/main/openapi/openapi-bff.yaml @@ -15,7 +15,7 @@ paths: get: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userProfile @@ -37,7 +37,7 @@ paths: delete: x-onecx: permissions: - user-profile: + userProfile: - delete tags: - userProfile @@ -56,7 +56,7 @@ paths: get: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userProfile @@ -78,7 +78,7 @@ paths: post: x-onecx: permissions: - user-profile: + userProfile: - write tags: - userProfile @@ -113,7 +113,7 @@ paths: patch: x-onecx: permissions: - user-profile: + userProfile: - write tags: - userProfile @@ -145,7 +145,7 @@ paths: delete: x-onecx: permissions: - user-profile: + userProfile: - delete tags: - userProfile @@ -166,7 +166,7 @@ paths: get: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userProfile @@ -188,7 +188,7 @@ paths: put: x-onecx: permissions: - user-profile: + userProfile: - write tags: - userProfile @@ -217,7 +217,7 @@ paths: get: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userProfile @@ -239,7 +239,7 @@ paths: put: x-onecx: permissions: - user-profile: + userProfile: - write tags: - userProfile @@ -268,7 +268,7 @@ paths: get: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userAvatar @@ -295,7 +295,7 @@ paths: post: x-onecx: permissions: - user-profile: + userProfile: - write tags: - userAvatar @@ -332,7 +332,7 @@ paths: delete: x-onecx: permissions: - user-profile: + userProfile: - delete tags: - userAvatar @@ -351,7 +351,7 @@ paths: post: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userProfileAdmin @@ -380,7 +380,7 @@ paths: get: x-onecx: permissions: - user-profile: + userProfile: - read tags: - userProfileAdmin @@ -400,7 +400,7 @@ paths: put: x-onecx: permissions: - user-profile: + userProfile: - write tags: - userProfileAdmin @@ -428,7 +428,7 @@ paths: delete: x-onecx: permissions: - user-profile: + userProfile: - delete tags: - userProfileAdmin diff --git a/src/test/resources/mockserver/permissions.json b/src/test/resources/mockserver/permissions.json index 4d9964e..537dbe9 100644 --- a/src/test/resources/mockserver/permissions.json +++ b/src/test/resources/mockserver/permissions.json @@ -13,7 +13,7 @@ "json": { "appId": "onecx-user-profile-bff", "permissions": { - "user-profile": ["read", "write", "delete"], + "userProfile": ["read", "write", "delete"], "permissions": ["admin-write","admin-read"] } }, @@ -35,7 +35,7 @@ "json": { "appId": "onecx-user-profile-bff", "permissions": { - "user-profile": ["read"], + "userProfile": ["read"], "permissions": ["admin-write","admin-read"] } },