Skip to content
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

fix: Resolve issue with configuration of tokens without account privileges #403

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Mar 14, 2023

📝 Description

This pull request resolves an issue that would prevent tokens created without account permissions from being configured using linode-cli --configure.

Resolves #398

✔️ How to Test

  1. Create a token without account permissions
  2. linode-cli configure --token

@zliang-akamai
Copy link
Member

zliang-akamai commented Mar 15, 2023

Can the users without account permission still use linode-cli?

Never mind, sorry, misread the description.

@zliang-akamai
Copy link
Member

zliang-akamai commented Mar 16, 2023

Thought about it again and did some experiments with the API, the validator seems also a workable way.

How about let's checking whether the token has the account read permission in the _check_full_access function? I thought that might be better than hacking with the HTTP request validator.

is_full_access = _check_full_access(self.base_url, token)

@lgarber-akamai lgarber-akamai merged commit 9a18154 into linode:dev Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants