func (h *HighLev) userChecks(user iface.User) error { verbSpec, ok := jsonp.GetM(h.nouns, fmt.Sprint("%v.verbs.%v.userCrit", h.desc.Sentence.Noun, h.desc.Sentence.Verb)) if ok { _, err := sanitize.Fast(verbSpec, user.Data()) return err } nounSpec, ok := jsonp.GetM(h.nouns, fmt.Sprintf("%v.userCrit", h.desc.Sentence.Noun)) if !ok { return nil } _, err := sanitize.Fast(nounSpec, user.Data()) return err }
func isProfessional(u iface.User) bool { _, ok := u.Data()["professional"] return ok }