From 367ce09318be95aadd082dd3b28e1ee2cb2b1234 Mon Sep 17 00:00:00 2001
From: Malte Bauch <malte.bauch@stud.h-da.de>
Date: Wed, 7 Jun 2023 14:50:50 +0200
Subject: [PATCH] Update default admin role so it is possible to access the pnd
 routes

In cf3b16dd46aaec011be0804b0c45640596f180bf the nbi has been refactored
and therefore some pnd related operations have been moved from the
CoreServer to the PndServer. We've missed to update the default admin
role to have access to those new routes that have been introduced with
this change. This commit updates the default admin role to fix this
issue.
---
 controller/controller.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/controller/controller.go b/controller/controller.go
index b0ef5f14d..e45e9506f 100644
--- a/controller/controller.go
+++ b/controller/controller.go
@@ -268,10 +268,10 @@ func ensureDefaultRoleExists() error {
 
 	if adminRole == nil {
 		err := c.roleService.Add(rbacImpl.NewRole(uuid.New(), defaultAdminRoleName, "admin role", []string{
-			"/gosdn.core.CoreService/GetPnd",
-			"/gosdn.core.CoreService/GetPndList",
-			"/gosdn.core.CoreService/CreatePndList",
-			"/gosdn.core.CoreService/DeletePnd",
+			"/gosdn.pnd.PndService/GetPnd",
+			"/gosdn.pnd.PndService/GetPndList",
+			"/gosdn.pnd.PndService/CreatePndList",
+			"/gosdn.pnd.PndService/DeletePnd",
 			"/gosdn.rbac.UserService/CreateUsers",
 			"/gosdn.rbac.UserService/GetUser",
 			"/gosdn.rbac.UserService/GetUsers",
-- 
GitLab