Mercurial > gemma
comparison pkg/imports/report.go @ 5376:e09e003948c7 extented-report
Decouple and enforce roles in creating scheduled imports.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 24 Jun 2021 19:24:21 +0200 |
parents | 755ed195fdc3 |
children | d19fdf3d2099 |
comparison
equal
deleted
inserted
replaced
5375:755ed195fdc3 | 5376:e09e003948c7 |
---|---|
25 "regexp" | 25 "regexp" |
26 "strings" | 26 "strings" |
27 "text/template" | 27 "text/template" |
28 "time" | 28 "time" |
29 | 29 |
30 "gemma.intevation.de/gemma/pkg/auth" | |
30 "gemma.intevation.de/gemma/pkg/common" | 31 "gemma.intevation.de/gemma/pkg/common" |
31 "gemma.intevation.de/gemma/pkg/config" | 32 "gemma.intevation.de/gemma/pkg/config" |
32 "gemma.intevation.de/gemma/pkg/misc" | 33 "gemma.intevation.de/gemma/pkg/misc" |
33 "gemma.intevation.de/gemma/pkg/models" | 34 "gemma.intevation.de/gemma/pkg/models" |
34 "gemma.intevation.de/gemma/pkg/xlsx" | 35 "gemma.intevation.de/gemma/pkg/xlsx" |
81 func (reportJobCreator) Depends() [2][]string { return [2][]string{{}, {}} } | 82 func (reportJobCreator) Depends() [2][]string { return [2][]string{{}, {}} } |
82 | 83 |
83 func (reportJobCreator) StageDone(context.Context, *sql.Tx, int64, Feedback) error { | 84 func (reportJobCreator) StageDone(context.Context, *sql.Tx, int64, Feedback) error { |
84 return nil | 85 return nil |
85 } | 86 } |
87 | |
88 // RequiresRoles enforces to be a sys_admin to run this . | |
89 func (*Report) RequiresRoles() auth.Roles { return auth.Roles{"sys_admin"} } | |
86 | 90 |
87 func (r *Report) Description() (string, error) { return r.Name, nil } | 91 func (r *Report) Description() (string, error) { return r.Name, nil } |
88 | 92 |
89 func (*Report) CleanUp() error { return nil } | 93 func (*Report) CleanUp() error { return nil } |
90 | 94 |