mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 08:36:14 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -52,10 +52,9 @@ func loadPermissions(ctx context.Context) {
|
||||
Permissions string `json:"permissions"`
|
||||
}
|
||||
var (
|
||||
rules [][]string
|
||||
polices []*Policy
|
||||
err error
|
||||
superRoleKey = g.Cfg().MustGet(ctx, "hotgo.admin.superRoleKey")
|
||||
rules [][]string
|
||||
polices []*Policy
|
||||
err error
|
||||
)
|
||||
|
||||
err = g.Model("hg_admin_role r").
|
||||
@@ -65,7 +64,7 @@ func loadPermissions(ctx context.Context) {
|
||||
Where("r.status", consts.StatusEnabled).
|
||||
Where("m.status", consts.StatusEnabled).
|
||||
Where("m.permissions !=?", "").
|
||||
Where("r.key !=?", superRoleKey.String()).
|
||||
Where("r.key !=?", consts.SuperRoleKey).
|
||||
Scan(&polices)
|
||||
if err != nil {
|
||||
g.Log().Fatalf(ctx, "loadPermissions Scan err:%v", err)
|
||||
|
Reference in New Issue
Block a user