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

NAS-130069 / 24.10 / Fix API key API #14030

Merged
merged 2 commits into from
Jul 19, 2024
Merged

NAS-130069 / 24.10 / Fix API key API #14030

merged 2 commits into from
Jul 19, 2024

Conversation

themylogin
Copy link
Contributor

No description provided.

@themylogin themylogin requested a review from a team July 17, 2024 12:27
@themylogin
Copy link
Contributor Author

time 1:30

@bugclerk bugclerk changed the title Fix API key API NAS-130069 / 24.10 / Fix API key API Jul 17, 2024
@bugclerk
Copy link
Contributor

class ApiKeyEntryWithKey(ApiKeyEntry):
key: Private[str]


class ApiKeyCreate(ApiKeyEntry):
id: Excluded = excluded_field()
key: Excluded = excluded_field()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since ApiKeyEntry no longer has a key, it seems like this line can be removed.



def test_has_key_after_creation_but_not_read():
api_key = call("api_key.create", {"name": "Test", "allowlist": []})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little confusing to use the name of a function as the name of a local variable imo

@themylogin themylogin merged commit d60e4bc into master Jul 19, 2024
1 check was pending
@themylogin themylogin deleted the NAS-130069 branch July 19, 2024 15:03
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants