|
|
|
@@ -296,10 +296,7 @@ func TrainJobGetLog(ctx *context.APIContext) { |
|
|
|
} |
|
|
|
|
|
|
|
func canLogDownload(user *models.User, task *models.Cloudbrain) bool { |
|
|
|
if user == nil { |
|
|
|
return false |
|
|
|
} |
|
|
|
if !user.IsAdmin && user.ID != task.UserID { |
|
|
|
if task == nil || !task.IsUserHasRight(user) { |
|
|
|
return false |
|
|
|
} |
|
|
|
prefix := strings.TrimPrefix(path.Join(setting.TrainJobModelPath, task.JobName, modelarts.LogPath, task.VersionName), "/") + "/job" |
|
|
|
|