mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
Merge pull request #1294 from swordqiu/hotfix/qj-user-show-system-user-not-found
fix: user-show system user not found
This commit is contained in:
@@ -43,6 +43,7 @@ func init() {
|
||||
type UserDetailOptions struct {
|
||||
ID string `help:"ID of user"`
|
||||
Domain string `help:"Domain"`
|
||||
System bool `help:"show system user"`
|
||||
}
|
||||
R(&UserDetailOptions{}, "user-show", "Show details of user", func(s *mcclient.ClientSession, args *UserDetailOptions) error {
|
||||
query := jsonutils.NewDict()
|
||||
@@ -53,6 +54,9 @@ func init() {
|
||||
}
|
||||
query.Add(jsonutils.NewString(domainId), "domain_id")
|
||||
}
|
||||
if args.System {
|
||||
query.Add(jsonutils.JSONTrue, "system")
|
||||
}
|
||||
user, e := modules.UsersV3.Get(s, args.ID, query)
|
||||
if e != nil {
|
||||
return e
|
||||
|
||||
Reference in New Issue
Block a user