-
-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need some other elaborated examples for react #176
Comments
What exactly do you want to see? Redux usage? App with more subject types? |
Todo app was helpful for me to understand about abilities, since it was a simple implementation. However I am planning to use CASL /React for an application similar to an CRM, which has a lot of buttons, components, user levels etc to handle. I am able to define my abilities but I find it difficult to link with CAN, do, i, subjects etc, hence requesting for another example using a enterprise level app in the explanation. Do you have one ?? |
I see. But can you please describe some usecase which you don’t understand how to implement? So I will be able to tackle only that particular aspect. |
I ll get back to you with an example soon |
I think that examples that work in jsfiddle would be better, easier to grasp at a glance and since this is all just JS it could be language agnostic examples and people can just fork the jsfiddle with more library examples and contribute. It seems to be a common theme here that practical examples are missing. |
@stalniy Find a sample app in the link below In this app I would like to achieve the following When Admin is chosen, When Manager is chosen, Tabs Purchase order, Report should be visible and clickable. Tab Master Data should be visible but Add Button in products and inventory should display Message "Only Admin can do this". When Project Leader is chosen, When Sales is chosen, When User is chosen, Please suggest the best practice |
@praveenkutty https://codesandbox.io/s/y2vzprmnvz?fontsize=14 Permissions for different roles are defined in |
@praveenkutty does it help you? |
Hi, @stalniy , I also want to use this awesome package but there is a problem if u can help...the case is the same as @praveenkutty but how it can be done if i want to fetch users, roles and permissions from database. i m using MYSQL with sequelize, nodeJS and ExpressJs. if u create a file elaborating that issue i shall be very thankful, Sorry to say I m beginner @ react if u feel inconvenience. |
Usually you need to get permissions during login and update client side ability instance with permissions.
This is a valid algorithm for any ui framework/code. here you can find information how to update abilities using json (see |
Currently don’t have enough free time to work on an example. Finishing article about Angular 7. Then I plan to update doc’s examples to be more interactive (plan to use scrimba for this). So, it may be a bit more helpful. Also plan to create a book of recipes and maybe udemy course but don’t know the schedule... probably closer to the end of the year. Currently close this issue as there is no plans to create other examples. Feel free to ask questions in gitter chat with provided links to what you have already done Thanks for the interest to casl :) |
Other than Todo app can you give me few example to get clear about this package
Thanks in advance.
The text was updated successfully, but these errors were encountered: