提交 05d560c1 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修复拷贝角色的错误提示

上级 a8caeb78
......@@ -64,16 +64,16 @@ func (authorityService *AuthorityService) CopyAuthority(copyInfo response.SysAut
if err != nil {
return
}
for i := range btns {
btns[i].AuthorityId = copyInfo.Authority.AuthorityId
}
err = global.GVA_DB.Create(&btns).Error
if len(btns) > 0 {
for i := range btns {
btns[i].AuthorityId = copyInfo.Authority.AuthorityId
}
err = global.GVA_DB.Create(&btns).Error
if err != nil {
return
if err != nil {
return
}
}
paths := CasbinServiceApp.GetPolicyPathByAuthorityId(copyInfo.OldAuthorityId)
err = CasbinServiceApp.UpdateCasbin(copyInfo.Authority.AuthorityId, paths)
if err != nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册