作者 yangfu

权限修改

... ... @@ -1933,6 +1933,10 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ
}
//判断机会权限
if request.ChanceId > 0 {
if chance, err = models.GetChanceById(request.ChanceId); err != nil {
err = protocol.NewErrWithMessage(5101)
return
}
if chance.Status == models.ChanceStatusClose || chance.EnableStatus == 0 { //机会关闭 / 删除
rsp.EditChance = 0
rsp.EditPublicStatus = 0
... ... @@ -1940,10 +1944,6 @@ func Permission(header *protocol.RequestHeader, request *protocol.PermissionRequ
log.Debug(fmt.Sprintf("用户:%v chance_id:%v 机会关闭/删除 无权限", header.UserId, chance.Id))
return
}
if chance, err = models.GetChanceById(request.ChanceId); err != nil {
err = protocol.NewErrWithMessage(5101)
return
}
//本人
if chance.UserId == header.UserId {
//审核通过 或者 已经被人审核过 就不能编辑了
... ...