service: drop unnecessary admin check in handleUserRun

The command is marked as admin-only already.
This commit is contained in:
Simon Ser 2023-01-18 16:05:41 +01:00
parent bdb470484f
commit 1ad2ee7ef5

View file

@ -1057,9 +1057,6 @@ func handleUserDelete(ctx *serviceContext, params []string) error {
}
func handleUserRun(ctx *serviceContext, params []string) error {
if !ctx.user.Admin {
return fmt.Errorf("only admins may run command as other users")
}
if len(params) < 2 {
return fmt.Errorf("expected at least two arguments")
}