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

powerplatform_user support environment without dataverse #529

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

mawasile
Copy link
Contributor

This pull request includes significant changes to the powerplatform_user resource, focusing on adding support for environments without Dataverse and updating the user management workflow. The most important changes include adding support for non-Dataverse environments, modifying test workflows, and updating documentation.

Support for Non-Dataverse Environments:

  • Added support for adding users to environments without Dataverse created. (.changes/unreleased/added-20241118-091212.yaml)
  • Updated the powerplatform_user resource to handle non-Dataverse environments, specifying that only 'Environment Admin' and 'Environment Maker' roles are allowed in such cases. (docs/resources/user.md) [1] [2]

Workflow Updates:

  • Modified the test workflow to focus on the TestAccUserResource_Validate_Create_Environment_User test. (.github/workflows/run_tests.yml)

Documentation Enhancements:

  • Updated the powerplatform_user documentation to include a note about role compatibility when transitioning from non-Dataverse to Dataverse environments. (docs/resources/user.md)

Example Configuration Adjustments:

  • Commented out the Azure AD and random provider configurations in example files to reflect the focus on non-Dataverse environments. (examples/resources/powerplatform_user/resource.tf, examples/resources/powerplatform_user/outputs.tf) [1] [2]

Internal Code Refactoring:

  • Added a new Find function to the array helper to facilitate searching within arrays. (internal/helpers/array/array.go)
  • Refactored the authorization service to distinguish between Dataverse and non-Dataverse user management, including methods for creating, updating, and deleting users in both contexts. (internal/services/authorization/api_user.go) [1] [2] [3] [4] [5] [6] [7] [8]
    [Copilot is generating a summary...]

@mawasile mawasile added the run-acceptance-tests PR tag for triggering acceptance tests label Nov 19, 2024
@mawasile mawasile linked an issue Nov 19, 2024 that may be closed by this pull request
github-actions[bot] added 7 commits November 19, 2024 11:11
…rm configuration; add user and environment resources for Dataverse integration
…ironment and user creation logic with security roles
… test cases for environment role assignments
…se user creation with environment role validation
…moval to handle internal server errors with logging
@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 66.93767% with 122 lines in your changes missing coverage. Please review.

Project coverage is 73.18%. Comparing base (7d15a3d) to head (6c24135).

Files with missing lines Patch % Lines
internal/services/authorization/resource_user.go 52.82% 73 Missing and 19 partials ⚠️
internal/services/authorization/api_user.go 83.33% 21 Missing and 6 partials ⚠️
internal/api/lifecycle.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #529      +/-   ##
==========================================
- Coverage   73.35%   73.18%   -0.18%     
==========================================
  Files         105      105              
  Lines       14957    15250     +293     
==========================================
+ Hits        10972    11161     +189     
- Misses       3306     3382      +76     
- Partials      679      707      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-acceptance-tests PR tag for triggering acceptance tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

powerplatform_user support environment without dataverse
2 participants