JOB_RELOAD_OR_START might collapse into JOB_START and JOB_VERIFY_ACTIVE is similar to JOB_START. Use the more heavy and appropriate permission "start" instead of "reload". --- src/core/job.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/core/job.c b/src/core/job.c index dd16a0b280..0b2e0373c6 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -1557,12 +1557,20 @@ const char* job_type_to_access_method(JobType t) { assert(t >= 0); assert(t < _JOB_TYPE_MAX); - if (IN_SET(t, JOB_START, JOB_RESTART, JOB_TRY_RESTART)) + switch (t) { + case JOB_START: + case JOB_RESTART: + case JOB_TRY_RESTART: + case JOB_RELOAD_OR_START: + case JOB_VERIFY_ACTIVE: return "start"; - else if (t == JOB_STOP) + case JOB_STOP: return "stop"; - else + case JOB_RELOAD: + case JOB_TRY_RELOAD: + default: return "reload"; + } } /* -- 2.32.0