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

[3/X] DXCDT-455: Fix permissions update issue in auth0_user_permissions resource #630

Merged
merged 5 commits into from
Jun 13, 2023

Conversation

sergiught
Copy link
Contributor

@sergiught sergiught commented Jun 13, 2023

🔧 Changes

Fixes permissions update issue in auth0_user_permissions resource.

📚 References

🔬 Testing

📝 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)

for _, addPermission := range toAdd {
permission := addPermission.(map[string]interface{})
addPermissions = append(addPermissions, &management.Permission{
var rmPermissions []*management.Permission
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fix is swapping around the removal and additions. We need to always perform removals first.

@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-role branch from a6d7c4e to a9405f9 Compare June 13, 2023 09:03
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-permissions branch from 5e6094b to aa4ca59 Compare June 13, 2023 09:03
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-role branch from a9405f9 to fbcee2e Compare June 13, 2023 09:04
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-permissions branch from aa4ca59 to 5633916 Compare June 13, 2023 09:04
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-role branch from fbcee2e to 211b445 Compare June 13, 2023 09:15
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-permissions branch from 5633916 to b1a2616 Compare June 13, 2023 09:15
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2023

Codecov Report

Merging #630 (b0885eb) into patch/DXCDT-455-import-tests-user-role (51ca2c0) will increase coverage by 0.00%.
The diff coverage is 51.72%.

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                           @@
##           patch/DXCDT-455-import-tests-user-role     #630   +/-   ##
=======================================================================
  Coverage                                   86.85%   86.85%           
=======================================================================
  Files                                          80       80           
  Lines                                       12290    12287    -3     
=======================================================================
- Hits                                        10674    10672    -2     
  Misses                                       1229     1229           
+ Partials                                      387      386    -1     
Impacted Files Coverage Δ
internal/auth0/user/resource_permissions.go 80.88% <51.72%> (+0.30%) ⬆️

@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-role branch from 211b445 to 449016b Compare June 13, 2023 09:34
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-permissions branch from b1a2616 to 9712026 Compare June 13, 2023 09:34
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-role branch from 449016b to 51ca2c0 Compare June 13, 2023 09:48
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-permissions branch from 9712026 to b0885eb Compare June 13, 2023 09:48
@sergiught sergiught marked this pull request as ready for review June 13, 2023 09:56
@sergiught sergiught requested a review from a team as a code owner June 13, 2023 09:56
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-role branch from 51ca2c0 to b84a0d9 Compare June 13, 2023 15:34
Base automatically changed from patch/DXCDT-455-import-tests-user-role to main June 13, 2023 15:39
@sergiught sergiught force-pushed the patch/DXCDT-455-import-tests-user-permissions branch from b0885eb to 76d2456 Compare June 13, 2023 15:40
@sergiught sergiught merged commit b56ebc7 into main Jun 13, 2023
@sergiught sergiught deleted the patch/DXCDT-455-import-tests-user-permissions branch June 13, 2023 15:47
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.

4 participants