Sets a permissions handler for a specific channel or resource.
Adding a handler to a channel without specifying a resource applies the handler to the channel and to any of its resources that don't have their own handlers. Learn more about permission resolution.
Channel or resource to set a permissions handler for.
handler(channel: Channel, subscriber: Subscriber): Promise<ChannelPermissions> | ChannelPermissions 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.