Add authorized actions output on resources (#870)
This commit is contained in:
1 parent
ec6151d174
commit
dcb15cffbd
93 files changed
+2475
-1038
No files matched your search
@@ -111,10 +111,19 @@ func generateGroupTableOutput(in *groups.Group) string {
|
||||
"",
|
||||
"Group information:",
|
||||
base.WrapMap(2, maxLength+2, nonAttributeMap),
|
||||
"",
|
||||
" Scope:",
|
||||
base.ScopeInfoForOutput(in.Scope, maxLength),
|
||||
}
|
||||
|
||||
if len(in.AuthorizedActions) > 0 {
|
||||
ret = append(ret,
|
||||
"",
|
||||
" Authorized Actions:",
|
||||
base.WrapSlice(4, in.AuthorizedActions),
|
||||
)
|
||||
}
|
||||
|
||||
if len(in.Members) > 0 {
|
||||
ret = append(ret,
|
||||
"",
|
||||
|
||||
@@ -247,18 +247,24 @@ func (c *Command) Run(args []string) int {
|
||||
}
|
||||
if true {
|
||||
output = append(output,
|
||||
fmt.Sprintf(" ID: %s", g.Id),
|
||||
fmt.Sprintf(" Version: %d", g.Version),
|
||||
fmt.Sprintf(" ID: %s", g.Id),
|
||||
fmt.Sprintf(" Version: %d", g.Version),
|
||||
)
|
||||
}
|
||||
if g.Name != "" {
|
||||
output = append(output,
|
||||
fmt.Sprintf(" Name: %s", g.Name),
|
||||
fmt.Sprintf(" Name: %s", g.Name),
|
||||
)
|
||||
}
|
||||
if g.Description != "" {
|
||||
output = append(output,
|
||||
fmt.Sprintf(" Description: %s", g.Description),
|
||||
fmt.Sprintf(" Description: %s", g.Description),
|
||||
)
|
||||
}
|
||||
if len(g.AuthorizedActions) > 0 {
|
||||
output = append(output,
|
||||
" Authorized Actions:",
|
||||
base.WrapSlice(6, g.AuthorizedActions),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user