Skip to content

Commit

Permalink
fix: filter project role with system=true
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu Jian committed Oct 15, 2020
1 parent d1cbaea commit 8042b94
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/mcclient/modules/mod_roleassignments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8042b94

Please sign in to comment.