mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix: filter project role with system=true
This commit is contained in:
@@ -141,6 +141,10 @@ func (this *RoleAssignmentManagerV3) GetProjectUsers(s *mcclient.ClientSession,
|
||||
query.Add(jsonutils.JSONNull, "effective")
|
||||
}
|
||||
|
||||
if jsonutils.QueryBoolean(params, "system", false) {
|
||||
query.Add(jsonutils.JSONNull, "include_system")
|
||||
}
|
||||
|
||||
resource, e := params.GetString("resource")
|
||||
if e != nil {
|
||||
return jsonutils.JSONNull, e
|
||||
@@ -224,6 +228,10 @@ func (this *RoleAssignmentManagerV3) GetProjectRole(s *mcclient.ClientSession, i
|
||||
query.Add(jsonutils.JSONNull, "effective")
|
||||
}
|
||||
|
||||
if jsonutils.QueryBoolean(params, "system", false) {
|
||||
query.Add(jsonutils.JSONNull, "include_system")
|
||||
}
|
||||
|
||||
resource, err := params.GetString("resource")
|
||||
if err != nil {
|
||||
return jsonutils.JSONNull, err
|
||||
|
||||
Reference in New Issue
Block a user