Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Switching to project view not working when user is assigned custom Project Role

未關閉
#14,014 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
55/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
java
領域
api, authorization

研究方向

使用授予 "allow *" 的自訂 Project Role 重現此故障,接著檢查專案檢視中對 listApis、listZones 和 listCapabilities 的請求,並將其與 Admin 或 Regular 專案成員資格進行比較。在 API/UI 版本 4.22.1.1 和 4.22.1.0 中檢查行為。完成標準是:自訂角色使用者可以在沒有授權錯誤的情況下切換至專案檢視,且列出的請求都成功。

由索引模型根據 Issue 內容生成。

描述

component:projects component:UI type:regression
problem

If account/user is added to the project with custom role (even if role permisions are "allow *") user can login to CS successfully but switching to project view will fail and generate multiple errors: "

The given command 'listApis' either does not exist, is not available for user. Unable to proceed. Please contact your administrator." 
The given command 'listZones' either does not exist, is not available for user. Unable to proceed. Please contact your administrator.
The given command 'listCapabilities' either does not exist, is not available for user. Unable to proceed. Please contact your administrator.
...
Image

On browser console indeed you can see that request:
/client/api/?command=listApis&response=json&sessionkey=xxx&projectid=xxx
returns:
{"listapisresponse":{"uuidList":[],"errorcode":401,"cserrorcode":9999,"errortext":"The given command 'listApis' either does not exist, is not available for user."}}
If user is added to the project with Admin or Regular Type without any project role, switching to project view works correctly.

Switching to project view using custom Project Roles in 4.22.1.0 works correctly.
Also using UI ver. 4.22.1.1 and Api ver: 4.22.1.0 works correctly.

No additional logs available in:

cloudstack/management/apilog.log
cloudstack/management/management-server.log
versions

ACS: 4.22.1.1

The steps to reproduce the bug
  1. Create new project "Test"
  2. Create Project Role with "allow *" permission
  3. Add non-admin user to project with that Project Role
  4. Switch to Project View of "Test" project
What to do about it?

Please track the root cause and fix the bug

主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 8 小時
30 天內合併 PR
20

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。