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

Readonly permissions field to user #572

Merged
merged 13 commits into from
May 10, 2023
Merged

Readonly permissions field to user #572

merged 13 commits into from
May 10, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented May 9, 2023

🔧 Changes

Before the auth0_user_permission and auth0_user_permissions resources can be created, they need to be testable. And currently, there is no way to check a user's permissions (detached from role). This PR adds the read-only permissions field to user resource and data source so that the aforementioned resources can be implemented and tested.

🔬 Testing

The added integration test cases are limited in strength because there is still no way to assign user permissions through Terraform. However, the cases demonstrate that the permissions do function at a base level.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd requested a review from a team as a code owner May 9, 2023 14:59
docs/index.md Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented May 9, 2023

Codecov Report

Patch coverage: 35.29% and project coverage change: -0.09 ⚠️

Comparison is base (c31648d) 87.55% compared to head (84028c3) 87.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
- Coverage   87.55%   87.46%   -0.09%     
==========================================
  Files          64       64              
  Lines        9996    10013      +17     
==========================================
+ Hits         8752     8758       +6     
- Misses        941      950       +9     
- Partials      303      305       +2     
Impacted Files Coverage Δ
internal/auth0/user/resource.go 70.68% <35.29%> (-2.21%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

internal/auth0/user/resource.go Outdated Show resolved Hide resolved
internal/auth0/user/resource.go Show resolved Hide resolved
"description": {
Type: schema.TypeString,
Computed: true,
Description: "Description of the permission.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Description: "Description of the permission.",
Description: "The description of the permission.",

internal/auth0/user/resource.go Outdated Show resolved Hide resolved
internal/auth0/user/resource.go Show resolved Hide resolved
internal/auth0/user/resource.go Outdated Show resolved Hide resolved
@willvedd willvedd enabled auto-merge (squash) May 10, 2023 17:43
@willvedd willvedd requested a review from sergiught May 10, 2023 17:43
@willvedd willvedd merged commit 839c31a into main May 10, 2023
@willvedd willvedd deleted the user-permissions-field branch May 10, 2023 17:49
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.

3 participants