From 1ad2ee7ef51930a6821e92fe1123ea449fac7952 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 18 Jan 2023 16:05:41 +0100 Subject: [PATCH] service: drop unnecessary admin check in handleUserRun The command is marked as admin-only already. --- service.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/service.go b/service.go index 4458195..5960bd3 100644 --- a/service.go +++ b/service.go @@ -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") }