could not find the login username and password of the examples/pixels-admin, any clues?
I am trying to find a complete example about casbin for RBAC, there are only two in the official examples, one of these are pixels-admin, but I did not find the login info, could not try it out.
any hint?
5 Replies
Hi @crosssz. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Sure, I can guide you through the process of setting up Role Based Access Control (RBAC) with Casbin in refine.
Firstly, you need to install Casbin in your project. You can do this by running the following command in your terminal:
Source (https://refine.dev/docs/advanced-tutorials/access-control/)
Then, you can use the
accessControlProvider
from refine to implement RBAC. Here is an example of how you can define your Casbin model and policies:
Source (https://refine.dev/blog/refine-pixels-6/)
In this example, the admin
role can list, edit, and delete canvases, and both admin
and editor
roles can list users.
You can find a complete example of how to use refine and Casbin to simplify access control management throughout your application in the refine Access Control Provider documentation (https://refine.dev/docs/api-reference/core/providers/accessControl-provider/).
As for the login information for the Pixels Admin app, it seems like the provided extracts do not contain this information. However, you can check out the source code of the Pixels Admin app here (https://github.com/refinedev/refine/tree/master/examples/pixels-admin) to find more details.
If you want to run the example on your local machine, you can use the following command:
Source (https://refine.dev/docs/examples/access-control/casbin/)
I hope this helps! Let me know if you have any other questions.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------<@850615794185666562> kapa.ai is still learning and improving, please let us know how it did by reacting below
deep-jade•13mo ago
Hello @crosssz
you can login with this credentials
email: demo@refine.dev
password: demodemo
eager-peach•13mo ago
@alicanerdurmaz thanks for prompt reply, it works! I also want to check admin user, where can I find it in this public example project?
deep-jade•13mo ago
source code is here
https://github.com/refinedev/refine/tree/next/examples/pixels-admin
GitHub
refine/examples/pixels-admin at next · refinedev/refine
Build your React-based CRUD applications, without constraints. 🌟 Star to support our work! - refinedev/refine