feat:完善项目信息
This commit is contained in:
@ -1,23 +1,23 @@
|
||||
package role
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/admin/controller"
|
||||
auth2 "SciencesServer/app/api/admin/controller/auth"
|
||||
model3 "SciencesServer/app/api/admin/model"
|
||||
model2 "SciencesServer/app/common/model"
|
||||
"SciencesServer/app/service"
|
||||
"SciencesServer/app/session"
|
||||
"SciencesServer/serve/orm"
|
||||
"SciencesServer/utils"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Auth struct{ *controller.Platform }
|
||||
type Auth struct{ *session.Admin }
|
||||
|
||||
type AuthHandle func(session *service.Session) *Auth
|
||||
type AuthHandle func(session *session.Admin) *Auth
|
||||
|
||||
// List 角色权限列表
|
||||
func (c *Auth) List(roleID uint64) ([]*auth2.TreeChecked, error) {
|
||||
// Index 角色权限列表
|
||||
func (c *Auth) Index(roleID uint64) ([]*auth2.TreeChecked, error) {
|
||||
mSysAuth := model3.NewSysAuth()
|
||||
|
||||
out, err := mSysAuth.RoleAuth(c.TenantID, roleID)
|
||||
@ -81,7 +81,7 @@ func (c *Auth) Bind(roleID uint64, authIDs []uint64) error {
|
||||
}
|
||||
|
||||
func NewAuth() AuthHandle {
|
||||
return func(session *service.Session) *Auth {
|
||||
return &Auth{Platform: &controller.Platform{Session: session}}
|
||||
return func(session *session.Admin) *Auth {
|
||||
return &Auth{Admin: session}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user