Sets a permissions handler for a specific channel or resource.
Adding a handler to a channel without specifying a resource adds the handler to the channel and to all resources that don't have their own handler. Learn more about permission resolution.
Channel or resource to set a permissions handler for.
handler(channel: Channel, subscriber: Subscriber): Promise<{read: boolean}> | {read: boolean} Handler to run when checking permissions for the specified channel.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.