Skip to content

Commit 5a0721c

Browse files
committed
refactor casbin conf mv to reposDir
1 parent b605b73 commit 5a0721c

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,11 @@ Open `http://127.0.0.1:8787/` with the browser
6262
* create new repo `done`
6363
* sign in/auth by role
6464

65-
登录后,右上角 signin 按钮隐藏,变成 sign out。同时显示用户名 gitcode or guest
65+
show username and signout
6666

67-
readme.md 会发两次请求,一次cancel,估计是第一次后端写数据有问题。
67+
bug: request readme.md twice, and the first one canceled.
6868

69-
权限bug, gitcode 登录后,权限不对
70-
71-
casbin 两个配置文件打包进入二进制文件
69+
c.SetCookie("token", token, COOKIE_MAX_TTL, "/", "127.0.0.1", true, true)
7270

7371
## Future
7472

File renamed without changes.
File renamed without changes.

gitcode.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ func main() {
598598
flag.Parse()
599599
gitcodeCfg = loadConfig(filepath.Join(reposDir, "gitcode.yaml"))
600600

601-
enforcer = casbin.NewEnforcer("./rbac_model.conf", "./rbac_policy.csv")
601+
enforcer = casbin.NewEnforcer(filepath.Join(reposDir, "rbac_model.conf"), filepath.Join(reposDir, "rbac_policy.csv"))
602602

603603
router := gin.Default()
604604
router.SetHTMLTemplate(newTemplate())

0 commit comments

Comments
 (0)