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

Cleanup 'getUserTokenInheritAnnotation' #1294

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Feb 11, 2022

This function used to just return a bool of whether the annotation was "true"
or not which is a bit diffferent than what the name implied. Change to inheritUserTokenIsSet
to be more clear. It also used to check if the annotation was set internally which
shouldn't be needed as we only cared about whether it was "true" or not. If the
value isn't in the map we should just get back the default value of a string which
is fine for what it was being used for.

Additionally moves a comment that was mistakingly directly above the function body
to the top of the file.

This function used to just return a bool of whether the annotation was "true"
or not which is a bit diffferent than what the name implied. Change to inheritUserTokenIsSet
to be more clear. It also used to check if the annotation was set internally which
shouldn't be needed as we only cared about whether it was "true" or not. If the
value isn't in the map we should just get back the default value of a string which
is fine for what it was being used for.

Additionally moves a comment that was mistakingly directly above the function body
to the top of the file.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
@dcantah dcantah requested a review from a team as a code owner February 11, 2022 19:12
@dcantah dcantah merged commit 51f5ab8 into microsoft:master Feb 12, 2022
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
This function used to just return a bool of whether the annotation was "true"
or not which is a bit diffferent than what the name implied. Change to inheritUserTokenIsSet
to be more clear. It also used to check if the annotation was set internally which
shouldn't be needed as we only cared about whether it was "true" or not. If the
value isn't in the map we should just get back the default value of a string which
is fine for what it was being used for.

Additionally moves a comment that was mistakingly directly above the function body
to the top of the file.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants