lavender/server/owners.go

18 lines
350 B
Go
Raw Normal View History

2023-10-27 09:40:10 +01:00
package server
// DomainOwnership is the structure for storing if a user owns a domain
type DomainOwnership map[string][]string
func (d DomainOwnership) AllOwns(user string) []string {
return d[user]
}
func (d DomainOwnership) Owns(user, domain string) bool {
for _, i := range d[user] {
if i == domain {
return true
}
}
return false
}