Sets a permissions handler for a specific channel or channel resource.
Adding a handler to a channel without specifying a resource applies the handler to the channel itself and to any of its resources that don't have their own handler.
For example, given the following setup:
add())add())Permissions are checked as follows:
Channel or channel resource to set a permissions handler for.
handler(channel: Channel, subscriber: Subscriber): Promise<{read: boolean}> | {read: boolean} Function 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.