Restrict an entier ressources with usePermission
Hi everyone !!
I try to display ressources according to certains roles return by the API. I see in the doc that we can limit editing according to roles or limit certain view but how can we limit an entiere ressources ?
5 Replies
harsh-harlequin•2y ago
Hi,
maybe you can create <HavePermission> component and you can wrap your resources ` for more fine tuned permission handling, probably this https://refine.dev/docs/api-reference/core/providers/accessControl-provider/ is a better option
maybe you can create <HavePermission> component and you can wrap your resources ` for more fine tuned permission handling, probably this https://refine.dev/docs/api-reference/core/providers/accessControl-provider/ is a better option
afraid-scarletOP•2y ago
Thank you @alicanerdurmaz, is it possible t o do it on pages of a ressouces object instead of do it a it page ?
For example, specifie an option like we specify a DataProvider
harsh-harlequin•2y ago
unfortunately not 😦
refine handles this with more finely-tuned with
accessControlProvider
for example; when you use ths code, all products
pages will give 404 and will remove on sider.
afraid-scarletOP•2y ago
Ok thank you @alicanerdurmaz, have a nice day 💪
harsh-harlequin•2y ago
you too 🙏