Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide capability for system admins to use zms-cli to set business service #2618

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion libs/go/zmscli/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,16 @@ func (cli Zms) SetDomainBusinessService(dn string, businessService string) (*str
}
err = cli.SetCompleteDomainMeta(dn, domain.Description, string(domain.Org), domainAuditEnabled, domain.ApplicationId, businessService)
if err != nil {
return nil, err
// if the operation fails we're going to try the operation as a system
// administrator who might have required authorization to set the business
// service on all domains instead of the domain administrator
meta := zms.DomainMeta{
BusinessService: businessService,
}
// if the operation fails, we're going to return the original error
if cli.Zms.PutDomainSystemMeta(zms.DomainName(dn), "businessservice", cli.AuditRef, &meta) != nil {
return nil, err
}
}
s := "[domain " + dn + " business-service successfully updated]\n"
message := SuccessMessage{
Expand Down
Loading