// AuthorizeActor return true if the given actor is authorized.
AuthorizeActor return true if the given actor is authorized.
// AuthorizeActor return true if the given actor is authorized .
func (h *AcceptListAuthHandler) AuthorizeActor(actor *vocab.ActorType) (bool, error) {
	allowList, err := h.mgr.Get(h.allowType)
	if err != nil {
		return false, fmt.Errorf("load accept list: %w", err)
	}
	if contains(allowList, actor.ID().URL()) {
		logger.Debugf("Actor [%s] is in the accept list for type [%s]", actor.ID(), h.allowType)
		return true, nil
	}
	logger.Debugf("Actor [%s] is NOT in the accept list for type [%s]", actor.ID(), h.allowType)
	return false, nil
}
func ( h * AcceptListAuthHandler ) AuthorizeActor ( actor * vocab . ActorType ) ( bool , error ) { allowList , err := h . mgr . Get ( h . allowType ) if err != nil { return false , fmt . Errorf ( " " , err ) } if contains ( allowList , actor . ID ( ) . URL ( ) ) { logger . Debugf ( " " , actor . ID ( ) , h . allowType ) return true , nil } logger . Debugf ( " " , actor . ID ( ) , h . allowType ) return false , nil }
AuthorizeActor return true if the given actor is authorized.
AuthorizeActor return true if the given actor is authorized .