Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
Signed-off-by: abarreiro <abarreiro@vmware.com>
  • Loading branch information
adambarreiro committed Jun 13, 2024
1 parent ae3fac4 commit 2a47f74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion govcd/access_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (client *Client) setAccessControlWithHttpMethod(httpMethod string, accessCo
return fmt.Errorf("[client.SetAccessControl] subject %s (%s) used more than once", setting.Subject.Name, setting.Subject.HREF)
}
used[setting.Subject.HREF] = true
if setting.Subject.Type == "" && entityType != "VDC Template" { // VDC Templates must not send subject type, otherwise calls fail
if setting.Subject.Type == "" && !strings.Contains(strings.ToLower(href), "vdctemplate") { // VDC Templates must not send subject type, otherwise calls fail
return fmt.Errorf("[client.SetAccessControl] subject %s (%s) has no type defined", setting.Subject.Name, setting.Subject.HREF)
}
}
Expand Down

0 comments on commit 2a47f74

Please sign in to comment.