saltstack / saltstack/salt

Human-readable expire in user.present

Open
#55,983 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature good first issue
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

According to user.present documentation the expire property of user.present should be specified as an integer as

Date that account expires, represented in days since epoch (January 1, 1970)

To make it more human-readable I want to be able to specify it as a string with an ISO 8601 date (e.g. "2020-01-27").

Instead of:

foo-expires:
  user.present:
    - name: foo
    - expire: 18288

I would like to be able to have:

foo-expires:
  user.present:
    - name: foo
    - expire: 2020-01-27

That would make it much easier to understand when a user expires.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the user.present implementation referenced by the linked documentation and read how its expire property is currently handled. Confirm the intended date format and existing integer behavior, then add coverage for the requested ISO 8601 string and verify that both supported forms produce the expected expiration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.