* fix:#957
* fix:#942
This commit is contained in:
songzhibin97
2022-03-16 18:21:15 +08:00
committed by GitHub
parent c193eb155e
commit 97a3ca223f
8 changed files with 59 additions and 29 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ func DefaultCasbin() []CasbinInfo {
{Path: "/menu/getMenu", Method: "POST"},
{Path: "/jwt/jsonInBlacklist", Method: "POST"},
{Path: "/base/login", Method: "POST"},
{Path: "/user/register", Method: "POST"},
{Path: "/user/admin_register", Method: "POST"},
{Path: "/user/changePassword", Method: "POST"},
{Path: "/user/setUserAuthority", Method: "POST"},
{Path: "/user/setUserInfo", Method: "PUT"},
+12
View File
@@ -1,5 +1,7 @@
package request
import model "github.com/flipped-aurora/gin-vue-admin/server/model/system"
// User register structure
type Register struct {
Username string `json:"userName"`
@@ -35,3 +37,13 @@ type SetUserAuthorities struct {
ID uint
AuthorityIds []string `json:"authorityIds"` // 角色ID
}
type ChangeUserInfo struct {
ID uint `gorm:"primarykey"` // 主键ID
NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称
Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户角色ID
AuthorityIds []string `json:"authorityIds" gorm:"-"` // 角色ID
Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱
HeaderImg string `json:"headerImg" gorm:"default:https://qmplusimg.henrongyi.top/gva_header.jpg;comment:用户头像"` // 用户头像
Authorities []model.SysAuthority `json:"-" gorm:"many2many:sys_user_authority;"`
}