{"id":21252624,"url":"https://github.com/jcasbin/jcasbin-menu-permission","last_synced_at":"2025-07-11T01:33:05.451Z","repository":{"id":220281034,"uuid":"743551626","full_name":"jcasbin/jcasbin-menu-permission","owner":"jcasbin","description":"Casbin Menu Permission Example (Based on jCasbin)","archived":false,"fork":false,"pushed_at":"2024-03-24T08:16:54.000Z","size":19475,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-24T09:23:56.227Z","etag":null,"topics":["abac","acl","auth","authorization","authz","casbin","data","go","java","jcasbin","menu","permission","rbac","spring","springboot"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/jcasbin","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcasbin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-15T13:32:20.000Z","updated_at":"2024-03-24T09:24:11.355Z","dependencies_parsed_at":"2024-03-24T09:24:09.076Z","dependency_job_id":"7a790b9e-25bf-47ad-9aba-fc1b679af937","html_url":"https://github.com/jcasbin/jcasbin-menu-permission","commit_stats":null,"previous_names":["jcasbin/jcasbin-menu-permission"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fjcasbin-menu-permission","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fjcasbin-menu-permission/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fjcasbin-menu-permission/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcasbin%2Fjcasbin-menu-permission/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcasbin","download_url":"https://codeload.github.com/jcasbin/jcasbin-menu-permission/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669664,"owners_count":17505386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abac","acl","auth","authorization","authz","casbin","data","go","java","jcasbin","menu","permission","rbac","spring","springboot"],"created_at":"2024-11-21T03:48:08.825Z","updated_at":"2024-11-21T03:48:09.466Z","avatar_url":"https://github.com/jcasbin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jcasbin-menu-permission\n\n## Introduction\nThis document presents an example of dynamic permission menu loading based on jCasbin. Through jCasbin, you can easily manage menu permissions in Spring Boot development.\n\n## Project Overview\n\n**Technology Stack**\n\n- **Backend:** Spring Boot 2.x + jCasbin + Spring Data JPA\n- **Frontend:** Tailwind CSS + Thymeleaf\n\n**Startup Instructions**\n\n1. 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`.\n2. 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. \n3. 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.\n\n## Simple Examples\n\n**Demonstration video**\n\n\u003cimg src=\"examples/example.gif\" alt=\"example_demo\"\u003e\n\n**Root user**\n\n\u003cimg src=\"examples/root_example.png\" alt=\"system_example\" style=\"zoom:60%;\" /\u003e\n\n**Admin user**\n\n\u003cimg src=\"examples/admin_example_1.png\" alt=\"admin_example\" style=\"zoom:60%;\" /\u003e\n\n\u003cimg src=\"examples/admin_example_2.png\" alt=\"admin_example\" style=\"zoom:60%;\" /\u003e\n\n**Normal user**\n\n\u003cimg src=\"examples/user_example.png\" alt=\"user_example\" style=\"zoom:60%;\" /\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcasbin%2Fjcasbin-menu-permission","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcasbin%2Fjcasbin-menu-permission","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcasbin%2Fjcasbin-menu-permission/lists"}