fix(gitlab): URL-encode namespace path in permission check
The namespace path from project info may contain special characters that need URL encoding. Use encode_project_path to ensure proper encoding when querying the /namespaces/ endpoint. This addresses review feedback about URL encoding consistency.
This commit is contained in:
@@ -252,8 +252,9 @@ class GitLabPermissionChecker:
|
||||
project_info = await self.glab_client._fetch_async(
|
||||
f"/projects/{encode_project_path(self.glab_client.config.project)}"
|
||||
)
|
||||
namespace_path = project_info.get("namespace", {}).get("full_path", "")
|
||||
namespace_info = await self.glab_client._fetch_async(
|
||||
f"/namespaces/{project_info.get('namespace', {}).get('full_path')}"
|
||||
f"/namespaces/{encode_project_path(namespace_path)}"
|
||||
)
|
||||
|
||||
# Check if namespace owner matches username
|
||||
|
||||
Reference in New Issue
Block a user