(apiScopes []management.ResourceServerScope, permissions *[]string)
| 269 | } |
| 270 | |
| 271 | func (c *cli) pickRolePermissions(apiScopes []management.ResourceServerScope, permissions *[]string) error { |
| 272 | // NOTE(cyx): We're inlining this for now since we have no generic |
| 273 | // usecase for this particular picker type yet. |
| 274 | var options []string |
| 275 | for _, s := range apiScopes { |
| 276 | options = append(options, s.GetValue()) |
| 277 | } |
| 278 | |
| 279 | p := &survey.MultiSelect{ |
| 280 | Message: "Permissions", |
| 281 | Options: options, |
| 282 | } |
| 283 | |
| 284 | err := survey.AskOne(p, permissions) |
| 285 | |
| 286 | return err |
| 287 | } |
| 288 | |
| 289 | func makePermissions(id string, permissions []string) []*management.Permission { |
| 290 | var result []*management.Permission |
no outgoing calls
no test coverage detected