mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
18 lines
561 B
Go
18 lines
561 B
Go
package acl
|
|
|
|
import "fmt"
|
|
|
|
// ForeignDataWrapper models the privileges of a domain aclitem
|
|
type ForeignDataWrapper struct {
|
|
ACL
|
|
}
|
|
|
|
// NewForeignDataWrapper parses an ACL object and returns a ForeignDataWrapper object.
|
|
func NewForeignDataWrapper(acl ACL) (ForeignDataWrapper, error) {
|
|
if !validRights(acl, validForeignDataWrapperPrivs) {
|
|
return ForeignDataWrapper{}, fmt.Errorf("invalid flags set for domain (%+q), only %+q allowed", permString(acl.Privileges, acl.GrantOptions), validForeignDataWrapperPrivs)
|
|
}
|
|
|
|
return ForeignDataWrapper{ACL: acl}, nil
|
|
}
|