Skip to content

Commit

Permalink
fix: fix video demo
Browse files Browse the repository at this point in the history
fix: fix video demo
  • Loading branch information
amikecoXu committed Feb 2, 2024
1 parent 53beb3f commit 0aff1f3
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ This document presents an example of dynamic permission menu loading based on jC
**Technology Stack**

- **Backend:** Spring Boot 2.x + jCasbin + Spring Data JPA
- **Frontend:** Bootstrap + Thymeleaf
- **Frontend:** Tailwind CSS + Thymeleaf

**Startup Instructions**

1. Build the menu structure you need in the [`casbin/policy.csv`](https://github.com/jcasbin/jcasbin-menu-permission/blob/master/src/main/resources/casbin/policy.csv) file. Specifically, `g2` represents the relationship between menus. For example: `g2, submenu name, parent menu name`.
2. Once the configuration is complete, run the `main` method in [`Application.java`](https://github.com/jcasbin/jcasbin-menu-permission/blob/master/src/main/java/org/casbin/Application.java) located under `org/casbin/`. Access `http://localhost:8080/casbin/menu` for testing.
2. Once the configuration is complete, run the `main` method in [`Application.java`](https://github.com/jcasbin/jcasbin-menu-permission/blob/master/src/main/java/org/casbin/Application.java) located under `org/casbin/`. Access `http://localhost:8080/` for testing.
3. The access control model file for jCasbin is located at [`casbin/model.conf`](https://github.com/jcasbin/jcasbin-menu-permission/blob/master/src/main/resources/casbin/model.conf), and the policy file is at [`casbin/policy.csv`](https://github.com/jcasbin/jcasbin-menu-permission/blob/master/src/main/resources/casbin/policy.csv). Modify them as needed based on your requirements.

## Simple Examples

**Demonstration video**

<video width="640" height="480" controls>
<source src="examples/example.mp4" type="video/mp4">
</video>
<img src="examples/example.gif" alt="example_demo">

**Root user**

<img src="examples/root_example.png" alt="system_example" style="zoom:60%;" />

**Admin user**

<img src="examples/admin_example.png" alt="admin_example" style="zoom:60%;" />
<img src="examples/admin_example_1.png" alt="admin_example" style="zoom:60%;" />

<img src="examples/admin_example_2.png" alt="admin_example" style="zoom:60%;" />

**Normal user**

Expand Down
Binary file removed examples/admin_example.png
Binary file not shown.
Binary file added examples/admin_example_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/admin_example_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed examples/example.mp4
Binary file not shown.
Binary file modified examples/root_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/user_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0aff1f3

Please sign in to comment.