How to use `organizationLimit` with function? Why it returns boolean?
While using the Organization and Admin Plugins I need to make sure that
The organizationLimit seems to be the setting I'm looking for, but I don't understand the return signature, the docs: https://www.better-auth.com/docs/plugins/organization#options say either a number or a function that return a boolean? I can use the function to check against the user but I'd still need the function to return a number, either let's say 100 for admins/owners and only 1 for any other role. But I can only return boolean from the function? what for?
admin Users can be in as many orgs as owner while each other org role (admin and member) can only be without a single org.The organizationLimit seems to be the setting I'm looking for, but I don't understand the return signature, the docs: https://www.better-auth.com/docs/plugins/organization#options say either a number or a function that return a boolean? I can use the function to check against the user but I'd still need the function to return a number, either let's say 100 for admins/owners and only 1 for any other role. But I can only return boolean from the function? what for?
The organization plugin allows you to manage your organization's members and teams.