You should implement this each time you create a feature within Kana to ensure
your user’s don’t accidentally use the feature in question when they
shouldn’t.
Prerequisites
You will need to ensure you have details on both:- The user who has used the feature
- The feature which the user has used
id of both.
Code Sample
Basic
Node.js
Example
Node.js
This should always take place before the feature is used. It should be the
first thing you do to ensure you return as early as possible when they don’t
have access, preventing any unnecessary continuation or accidental usage.
Next Steps
Congratulations 🎉 You’ve now successfully checked a users entitlement to
a feature and blocked them from using the feature if they should have no
access.
messages feature, your users may be able to send messages via your UI and through an API call - both should block access when necessary.
You may want to also implement something similar on the frontend of your application to prevent feature access at source.
Block Feature Access (Frontend)
If you haven’t yet recorded usage of your features when access is granted, we strongly recommend this as a next step. It’s a key requirement in order for us to understand a user’s entitlement towards a feature.
Record Feature Usage