Something went wrong. Try again.
A community based topic aggregation platform built on atproto
Something went wrong. Try again.
473 B · 19 lines
Go
at main
1234567891011121314151617181920package moderation
// NewAllowlistAuthority builds an Authority from the configured admin DIDs.func NewAllowlistAuthority(dids []string) Authority { allowed := make(map[string]struct{}, len(dids)) for _, did := range dids { allowed[did] = struct{}{} } return allowlistAuthority{allowed: allowed}}
type allowlistAuthority struct { allowed map[string]struct{}}
func (a allowlistAuthority) IsInstanceAdmin(did string) bool { _, ok := a.allowed[did] return ok}