Implement content extraction job (#18022)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
758116f3e3
Коммит
a5463c8651
@@ -139,6 +139,12 @@ func RegisterJobsExportDeleteInterface(f func(*Server) tjobs.ExportDeleteInterfa
|
||||
jobsExportDeleteInterface = f
|
||||
}
|
||||
|
||||
var jobsExtractContentInterface func(*Server) tjobs.ExtractContentInterface
|
||||
|
||||
func RegisterJobsExtractContentInterface(f func(*Server) tjobs.ExtractContentInterface) {
|
||||
jobsExtractContentInterface = f
|
||||
}
|
||||
|
||||
var productNoticesJobInterface func(*Server) tjobs.ProductNoticesJobInterface
|
||||
|
||||
func RegisterProductNoticesJobInterface(f func(*Server) tjobs.ProductNoticesJobInterface) {
|
||||
|
||||
@@ -96,7 +96,8 @@ func (a *App) SessionHasPermissionToCreateJob(session model.Session, job *model.
|
||||
model.JobTypeImportDelete,
|
||||
model.JobTypeExportProcess,
|
||||
model.JobTypeExportDelete,
|
||||
model.JobTypeCloud:
|
||||
model.JobTypeCloud,
|
||||
model.JobTypeExtractContent:
|
||||
return a.SessionHasPermissionTo(session, model.PermissionManageJobs), model.PermissionManageJobs
|
||||
}
|
||||
|
||||
@@ -126,7 +127,8 @@ func (a *App) SessionHasPermissionToReadJob(session model.Session, jobType strin
|
||||
model.JobTypeImportDelete,
|
||||
model.JobTypeExportProcess,
|
||||
model.JobTypeExportDelete,
|
||||
model.JobTypeCloud:
|
||||
model.JobTypeCloud,
|
||||
model.JobTypeExtractContent:
|
||||
return a.SessionHasPermissionTo(session, model.PermissionReadJobs), model.PermissionReadJobs
|
||||
}
|
||||
|
||||
|
||||
@@ -2061,6 +2061,10 @@ func (s *Server) initJobs() {
|
||||
s.Jobs.ResendInvitationEmails = jobsResendInvitationEmailInterface(s)
|
||||
}
|
||||
|
||||
if jobsExtractContentInterface != nil {
|
||||
s.Jobs.ExtractContent = jobsExtractContentInterface(s)
|
||||
}
|
||||
|
||||
s.Jobs.InitWorkers()
|
||||
s.Jobs.InitSchedulers()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user