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

Adding Permissions to User Struct #674

Merged
merged 8 commits into from
Apr 5, 2023

Conversation

jeevanragula
Copy link
Contributor

@jeevanragula jeevanragula commented Mar 31, 2023

Description

Get Account API doesn't return Permission details. So I am adding Permissions in the User struct.
This will fix #673

Testing plan

External links

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

$ TFE_ADDRESS="https://example" TFE_TOKEN="example" go test ./... -v -run TestFunctionsAffectedByChange

?       github.com/hashicorp/go-tfe/examples/configuration_versions     [no test files]
?       github.com/hashicorp/go-tfe/examples/organizations      [no test files]
?       github.com/hashicorp/go-tfe/examples/registry_modules   [no test files]
?       github.com/hashicorp/go-tfe/examples/users      [no test files]
?       github.com/hashicorp/go-tfe/examples/workspaces [no test files]
?       github.com/hashicorp/go-tfe/mocks       [no test files]
=== RUN   TestUsersReadCurrent
=== RUN   TestUsersReadCurrent/two_factor_options_are_decoded
=== RUN   TestUsersReadCurrent/permissions_are_decoded
--- PASS: TestUsersReadCurrent (1.67s)
    --- PASS: TestUsersReadCurrent/two_factor_options_are_decoded (0.00s)
    --- PASS: TestUsersReadCurrent/permissions_are_decoded (0.00s)
PASS
ok      github.com/hashicorp/go-tfe     1.854s


...

@jeevanragula jeevanragula requested a review from a team as a code owner March 31, 2023 09:17
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 31, 2023

CLA assistant check
All committers have signed the CLA.

@jeevanragula jeevanragula changed the title User permissions Adding Permissions to User Struct Mar 31, 2023
@jeevanragula
Copy link
Contributor Author

@barrettclark @nfagerlund @brandonc I could see you are in the approver list for this repository.
Can you please check this PR and issue?

Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

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

Thank you for the thorough contribution! My feedback is minor and I'll be happy to merge it once it's addressed

jeevanragula and others added 2 commits April 5, 2023 09:58
Co-authored-by: Brandon Croft <[email protected]>
Co-authored-by: Brandon Croft <[email protected]>
@jeevanragula
Copy link
Contributor Author

@brandonc Thanks for the suggestions. Updated the PR now.

@brandonc brandonc merged commit 2172f99 into hashicorp:main Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

@jeevanragula jeevanragula deleted the user-permissions branch April 6, 2023 03:57
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.

Get CurrentUser doesn't return Permission details
3 participants