This commit is contained in:
2026-08-16 20:58:57 +08:00
parent a85477be80
commit a9e1f9e6f8
42 changed files with 1569 additions and 156 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ func (r *authorityAccessRepo) CopyAuthority(ctx context.Context, sourceID uint,
}
parentAllowed := value.ParentID != nil && (allowed[*value.ParentID] || *value.ParentID == actor.AuthorityID)
if !parentAllowed {
return errors.New("严格角色模式下只能在自己的角色树中复制角色")
return errors.New("您提交的角色ID不合法")
}
}
var count int64
@@ -168,7 +168,7 @@ func (r *authorityAccessRepo) CopyAuthority(ctx context.Context, sourceID uint,
return err
}
if !allowed {
return errors.New("严格角色模式下不能复制当前角色未拥有的 API")
return errors.New("存在api不在权限列表中")
}
}
key := api.V1 + "\x00" + api.V2