MCPcopy Create free account
hub / github.com/cloudfoundry/cli / disableAllServiceAccess

Method disableAllServiceAccess

actor/v7action/service_access.go:187–210  ·  view source on GitHub ↗
(plans []resources.ServicePlan)

Source from the content-addressed store, hash-verified

185}
186
187func (actor *Actor) disableAllServiceAccess(plans []resources.ServicePlan) (SkippedPlans, Warnings, error) {
188 var (
189 allWarnings Warnings
190 skipped SkippedPlans
191 )
192
193 visibility := resources.ServicePlanVisibility{Type: resources.ServicePlanVisibilityAdmin}
194 for _, plan := range plans {
195 if plan.VisibilityType == resources.ServicePlanVisibilityAdmin {
196 skipped = append(skipped, plan.Name)
197 continue
198 }
199
200 _, visibilityWarnings, err := actor.CloudControllerClient.UpdateServicePlanVisibility(
201 plan.GUID,
202 visibility,
203 )
204 allWarnings = append(allWarnings, visibilityWarnings...)
205 if err != nil {
206 return skipped, allWarnings, err
207 }
208 }
209 return skipped, allWarnings, nil
210}
211
212func (actor *Actor) disableOrganizationServiceAccess(plans []resources.ServicePlan, orgName string) (SkippedPlans, Warnings, error) {
213 var allWarnings Warnings

Callers 1

DisableServiceAccessMethod · 0.95

Implementers 1

FakeActorcommand/v7/v7fakes/fake_actor.go

Calls 1

Tested by

no test coverage detected