mirror of
				https://github.com/bufanyun/hotgo.git
				synced 2025-11-04 16:23:43 +08:00 
			
		
		
		
	修复拉取新项目报错bug
修复权限分配任无权限操作bug
This commit is contained in:
		@@ -7,14 +7,15 @@ package common
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"github.com/gogf/gf/v2/errors/gerror"
 | 
			
		||||
	"github.com/gogf/gf/v2/frame/g"
 | 
			
		||||
	"hotgo/api/admin/common"
 | 
			
		||||
	"hotgo/internal/consts"
 | 
			
		||||
	"hotgo/internal/dao"
 | 
			
		||||
	"hotgo/internal/library/contexts"
 | 
			
		||||
	"hotgo/internal/model/entity"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
	"hotgo/internal/service"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogf/gf/v2/errors/gerror"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var Ems = new(cEms)
 | 
			
		||||
 
 | 
			
		||||
@@ -7,14 +7,15 @@ package common
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"github.com/gogf/gf/v2/errors/gerror"
 | 
			
		||||
	"github.com/gogf/gf/v2/frame/g"
 | 
			
		||||
	"hotgo/api/admin/common"
 | 
			
		||||
	"hotgo/internal/consts"
 | 
			
		||||
	"hotgo/internal/dao"
 | 
			
		||||
	"hotgo/internal/library/contexts"
 | 
			
		||||
	"hotgo/internal/model/entity"
 | 
			
		||||
	"hotgo/internal/model/input/sysin"
 | 
			
		||||
	"hotgo/internal/service"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogf/gf/v2/errors/gerror"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var Sms = new(cSms)
 | 
			
		||||
 
 | 
			
		||||
@@ -90,8 +90,8 @@ func loadPermissions(ctx context.Context) {
 | 
			
		||||
		Fields(q("r", dao.AdminRole.Columns().Key), q("m", dao.AdminMenu.Columns().Permissions)).
 | 
			
		||||
		Where(q("r", dao.AdminRole.Columns().Status), consts.StatusEnabled).
 | 
			
		||||
		Where(q("m", dao.AdminMenu.Columns().Status), consts.StatusEnabled).
 | 
			
		||||
		Where(q("m", dao.AdminMenu.Columns().Permissions), "").
 | 
			
		||||
		Where(q("r", dao.AdminRole.Columns().Key), consts.SuperRoleKey).
 | 
			
		||||
		WhereNot(q("m", dao.AdminMenu.Columns().Permissions), "").
 | 
			
		||||
		WhereNot(q("r", dao.AdminRole.Columns().Key), consts.SuperRoleKey).
 | 
			
		||||
		Scan(&polices)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		g.Log().Fatalf(ctx, "loadPermissions Scan err:%v", err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user