bugfix: System users can now be used in ACLs (#396)
This commit is contained in:
parent
6413e51cf5
commit
3f1dbf1130
|
|
@ -110,9 +110,7 @@ func exec(instant time.Time, action *config.Action, cfg *config.Config, ex *exec
|
|||
Action: action,
|
||||
Cfg: cfg,
|
||||
Tags: []string{"calendar"},
|
||||
AuthenticatedUser: &acl.AuthenticatedUser{
|
||||
Username: "calendar",
|
||||
},
|
||||
AuthenticatedUser: acl.UserFromSystem(cfg, "calendar"),
|
||||
}
|
||||
|
||||
ex.ExecRequest(req)
|
||||
|
|
|
|||
|
|
@ -37,9 +37,7 @@ func scheduleAction(cfg *config.Config, scheduler *cron.Cron, cronline string, e
|
|||
ActionTitle: action.Title,
|
||||
Cfg: cfg,
|
||||
Tags: []string{"cron"},
|
||||
AuthenticatedUser: &acl.AuthenticatedUser{
|
||||
Username: "cron",
|
||||
},
|
||||
AuthenticatedUser: acl.UserFromSystem(cfg, "cron"),
|
||||
}
|
||||
|
||||
ex.ExecRequest(req)
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@ func scheduleExec(action *config.Action, cfg *config.Config, ex *executor.Execut
|
|||
Cfg: cfg,
|
||||
Tags: []string{"fileindir"},
|
||||
Arguments: args,
|
||||
AuthenticatedUser: &acl.AuthenticatedUser{
|
||||
Username: "fileindir",
|
||||
},
|
||||
AuthenticatedUser: acl.UserFromSystem(cfg, "fileindir"),
|
||||
}
|
||||
|
||||
ex.ExecRequest(req)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ import (
|
|||
)
|
||||
|
||||
func Execute(cfg *config.Config, ex *executor.Executor) {
|
||||
user := &acl.AuthenticatedUser{
|
||||
Username: "startup-user",
|
||||
}
|
||||
user := acl.UserFromSystem(cfg, "startup-user")
|
||||
|
||||
for _, action := range cfg.Actions {
|
||||
if action.ExecOnStartup {
|
||||
|
|
|
|||
Loading…
Reference in New Issue