MCPcopy Create free account
hub / github.com/auth0/auth0-cli / pickRolePermissions

Method pickRolePermissions

internal/cli/roles_permissions.go:271–287  ·  view source on GitHub ↗
(apiScopes []management.ResourceServerScope, permissions *[]string)

Source from the content-addressed store, hash-verified

269}
270
271func (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
289func makePermissions(id string, permissions []string) []*management.Permission {
290 var result []*management.Permission

Callers 2

addRolePermissionsCmdFunction · 0.80
removeRolePermissionsCmdFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected