MCPcopy Index your code
hub / github.com/docker/cli / acceptPrivileges

Function acceptPrivileges

cli/command/plugin/install.go:110–118  ·  view source on GitHub ↗
(dockerCLI command.Streams, name string)

Source from the content-addressed store, hash-verified

108}
109
110func acceptPrivileges(dockerCLI command.Streams, name string) func(ctx context.Context, privileges plugin.Privileges) (bool, error) {
111 return func(ctx context.Context, privileges plugin.Privileges) (bool, error) {
112 _, _ = fmt.Fprintf(dockerCLI.Out(), "Plugin %q is requesting the following privileges:\n", name)
113 for _, privilege := range privileges {
114 _, _ = fmt.Fprintf(dockerCLI.Out(), " - %s: %v\n", privilege.Name, privilege.Value)
115 }
116 return prompt.Confirm(ctx, dockerCLI.In(), dockerCLI.Out(), "Do you grant the above permissions?")
117 }
118}

Callers 1

buildPullConfigFunction · 0.85

Calls 2

OutMethod · 0.65
InMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…