From c7559dea0a748ba0933071eeca8a94d07db589c5 Mon Sep 17 00:00:00 2001 From: Juldrixx <31806759+juldrixx@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:46:29 +0100 Subject: [PATCH] Fixed policy creation/update on Root PG (#486) * Fixed policy creation on Root PG * Update CHANGELOG * Update node image --- .circleci/config.yml | 2 +- CHANGELOG.md | 2 ++ pkg/clientwrappers/accesspolicies/policies.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52d9d8561f..5144559b27 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -234,7 +234,7 @@ jobs: deploy-website: working_directory: /home/circleci/nifikop/site docker: # run the steps with Docker - - image: node:23.2.0 + - image: node:23.1.0 steps: - checkout: path: /home/circleci/nifikop diff --git a/CHANGELOG.md b/CHANGELOG.md index a155e5b5ce..ed5b8642d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Fixed Bugs +- [PR #486](https://github.com/konpyutaika/nifikop/pull/486) - **[Operator/NifiUserGroup]** Fixed policy creation/update on Root PG. + ### Deprecated ### Removed diff --git a/pkg/clientwrappers/accesspolicies/policies.go b/pkg/clientwrappers/accesspolicies/policies.go index 8ca30f2ae3..3b9715d5f8 100644 --- a/pkg/clientwrappers/accesspolicies/policies.go +++ b/pkg/clientwrappers/accesspolicies/policies.go @@ -26,7 +26,7 @@ func ExistAccessPolicies(accessPolicy *v1.AccessPolicy, config *clientconfig.Nif return false, err } - return entity != nil && entity.Component.Resource == string(accessPolicy.Resource), nil + return entity != nil && entity.Component.Resource == string(accessPolicy.GetResource(config.RootProcessGroupId)), nil } func CreateAccessPolicy(accessPolicy *v1.AccessPolicy, config *clientconfig.NifiConfig) (string, error) {