|
|
|
@@ -146,8 +146,8 @@ func SaveModel(ctx *context.Context) { |
|
|
|
|
|
|
|
if !trainTaskCreate { |
|
|
|
if !ctx.Repo.CanWrite(models.UnitTypeModelManage) { |
|
|
|
ctx.NotFound(ctx.Req.URL.RequestURI(), nil) |
|
|
|
//ctx.ServerError("No right.", errors.New(ctx.Tr("repo.model_noright"))) |
|
|
|
//ctx.NotFound(ctx.Req.URL.RequestURI(), nil) |
|
|
|
ctx.ServerError("No right.", errors.New(ctx.Tr("repo.model_noright"))) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -415,6 +415,8 @@ func ShowModelInfo(ctx *context.Context) { |
|
|
|
ctx.Data["ID"] = ctx.Query("ID") |
|
|
|
ctx.Data["name"] = ctx.Query("name") |
|
|
|
ctx.Data["isModelManage"] = true |
|
|
|
ctx.Data["ModelManageAccess"] = ctx.Repo.CanWrite(models.UnitTypeModelManage) |
|
|
|
|
|
|
|
ctx.HTML(200, tplModelInfo) |
|
|
|
} |
|
|
|
|
|
|
|
|