default( )


Sets the default permissions handler.

The default handler runs in the following cases:

  • When subscribing to a channel, when no explicit handler is set for that channel.
  • When subscribing to a resource, when no explicit handler is set for that resource or its parent channel.

Learn more about permission resolution.

Method Declaration
Copy
Method Parameters
handlerfunctionRequired

handler(channel: Channel, subscriber: Subscriber): Promise<ChannelPermissions> | ChannelPermissions Default handler to run when checking permissions.

Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?