Minor Changes
-
Introduce feature or plan based authorization (#6188) by @wobsoriano
<Protect />Plan
<Protect plan="my-plan" />
Feature
<Protect feature="my-feature" />
Scoped per user or per org
<Protect feature="org:my-feature" /> <Protect feature="user:my-feature" /> <Protect plan="org:my-plan" /> <Protect plan="user:my-plan" />
useAuth()in ReactPlan
const { has } = useAuth(); has({ plan: 'my-plan' });
Feature
const { has } = useAuth(); has({ feature: 'my-feature' });
Scoped per user or per org
const { has } = useAuth(); has({ feature: 'org:my-feature' }); has({ feature: 'user:my-feature' }); has({ plan: 'user:my-plan' }); has({ plan: 'org:my-plan' });