Improve enforcer page.
6 files changed
tree: 5572c6f13e52a1335984ea8ec9a759499d832302
  1. conf/
  2. controllers/
  3. object/
  4. routers/
  5. util/
  6. web/
  7. .gitignore
  8. LICENSE
  9. main.go
  10. README.md
README.md

casbin-dashboard

Casbin-dashboard is the official web UI (admin portal) for Casbin models and policies. A security administrator can use it to view & edit Casbin models and policy rules.

Demo

https://dashboard.casbin.org/

Architecture

Casbin-dashboard contains 2 parts:

NameDescriptionLanguageSource code
FrontendWeb frontend UI for Casbin-dashboardJavascript + React + Ant Designhttps://github.com/casbin/casbin-dashboard/tree/master/web
BackendRESTful API backend for Casbin-dashboardGolang + Beego + MySQLhttps://github.com/casbin/casbin-dashboard

Installation

  • Get the code:
go get github.com/casbin/casbin-dashboard
  • Setup database:

Casbin-dashboard will store its metadata in a MySQL database named: casbin_metadata, will create it if not existed. The DB connection string can be specified at: https://github.com/casbin/casbin-dashboard/blob/master/conf/app.conf

dataSourceName = root:123@tcp(localhost:3306)/

Casbin-dashboard uses XORM to connect to DB, so all DBs supported by XORM can also be used.

  • Run backend (in port 8000):
go run main.go
  • Run frontend (in the same machine's port 3030):
cd web
npm install
npm start
  • Open browser:

http://localhost:3030/