From f2fd725e07f29d1aefbeade13acce9e716094d87 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Wed, 11 Mar 2026 23:23:52 +0800 Subject: [PATCH] fix(acl): correct endpoint paths for users, groups, and roles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the path mismatch between /acl/endpoints API and actual routes: - Users: /users/{id} → /access/users/{id} - Groups: /groups/{id} → /access/groups/{id} - Roles: /roles/{id} → /access/roles/{id} This fixes the error where creating ACE entries fails with: "Path '/groups/{id}' doesn't match any existing endpoint" The actual routes are registered under /access/ prefix, but the endpoints API was returning paths without the prefix. Co-Authored-By: Yue Guobin --- gns3server/api/routes/controller/acl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/api/routes/controller/acl.py b/gns3server/api/routes/controller/acl.py index ae33bd09e..f4b0e8897 100644 --- a/gns3server/api/routes/controller/acl.py +++ b/gns3server/api/routes/controller/acl.py @@ -115,19 +115,19 @@ async def endpoints( add_to_endpoints("/access/users", "All users", "user") users = await users_repo.get_users() for user in users: - add_to_endpoints(f"/users/{user.user_id}", f'User "{user.username}"', "user") + add_to_endpoints(f"/access/users/{user.user_id}", f'User "{user.username}"', "user") # groups add_to_endpoints("/access/groups", "All groups", "group") groups = await users_repo.get_user_groups() for group in groups: - add_to_endpoints(f"/groups/{group.user_group_id}", f'Group "{group.name}"', "group") + add_to_endpoints(f"/access/groups/{group.user_group_id}", f'Group "{group.name}"', "group") # roles add_to_endpoints("/access/roles", "All roles", "role") roles = await rbac_repo.get_roles() for role in roles: - add_to_endpoints(f"/roles/{role.role_id}", f'Role "{role.name}"', "role") + add_to_endpoints(f"/access/roles/{role.role_id}", f'Role "{role.name}"', "role") # images add_to_endpoints("/images", "All images", "image")