mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 19:23:44 +08:00
发布v2.15.1版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -226,6 +226,10 @@ func (s *sAdminRole) Delete(ctx context.Context, in *adminin.RoleDeleteInp) (err
|
||||
return gerror.New("数据不存在或已删除!")
|
||||
}
|
||||
|
||||
if models.Key == consts.SuperRoleKey {
|
||||
return gerror.New("超管角色禁止删除!")
|
||||
}
|
||||
|
||||
has, err := dao.AdminRole.Ctx(ctx).Where("pid", models.Id).One()
|
||||
if err != nil {
|
||||
err = gerror.Wrap(err, consts.ErrorORM)
|
||||
|
||||
Reference in New Issue
Block a user