Skip to content

Create a token on behalf of another user in the CLI #13160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bpmct opened this issue May 3, 2024 · 5 comments · Fixed by #14813
Closed

Create a token on behalf of another user in the CLI #13160

bpmct opened this issue May 3, 2024 · 5 comments · Fixed by #14813
Labels
cli Area: CLI good first issue Easily solved issues suitable for starters and community contributors

Comments

@bpmct
Copy link
Member

bpmct commented May 3, 2024

An Owner account should be able to create a token on behalf of another user in the CLI. Right now, you can only do it in the API: https://coder.com/docs/v2/latest/api/users#create-token-api-key

Desired state (example, doesn't have to be this flag/wording):

➜  ~ coder tokens create --help
coder v2.10.0+a7234f6

USAGE:
  coder tokens create [flags]

  Create a token

OPTIONS:
      --lifetime duration, $CODER_TOKEN_LIFETIME (default: 720h0m0s)
          Specify a duration for the lifetime of the token.

  -n, --name string, $CODER_TOKEN_NAME
          Specify a human-readable name.

+  -u, --user string, $CODER_TOKEN_USER
+          Create the token on behalf of another user (Admin only)

———
Run `coder --help` for a list of global options.
@coder-labeler coder-labeler bot added cli Area: CLI feature labels May 3, 2024
@matifali matifali added the good first issue Easily solved issues suitable for starters and community contributors label May 7, 2024
@Philip-21
Copy link

Philip-21 commented May 24, 2024

Hello @bpmct i would like to take on this issue and get started with things.

@matifali
Copy link
Member

matifali commented Jul 8, 2024

related to #10246

@SasSwart
Copy link
Contributor

Hey @joobisb! You seem to have merged a Pull request that addresses this issue. Is there still anything to do, or can it be closed?

@matifali
Copy link
Member

@SasSwart we can close this as completed.
@joobisb for future references please use the words as described in: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

These words automatically link the issue and PR and close the issue when PR gets merged.

close
closes
closed
fix
fixes
fixed
resolve
resolves
resolved

@joobisb
Copy link
Contributor

joobisb commented Oct 18, 2024

@SasSwart we can close this as completed. @joobisb for future references please use the words as described in: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

These words automatically link the issue and PR and close the issue when PR gets merged.

close
closes
closed
fix
fixes
fixed
resolve
resolves
resolved

@matifali
sure will do so, thanks for pointing out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI good first issue Easily solved issues suitable for starters and community contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants