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

DXCDT-348: Manage ul body in branding resource only if custom domains are set #446

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

sergiught
Copy link
Contributor

🔧 Changes

When no custom domains are set and we are trying to manage the universal login body template we get an error from the api: Error: 400 Bad Request: This feature requires at least one custom domain to be configured for the tenant..

The current logic only checks if a tenant flag is set to true, but that's unfortunately flawed.

In this PR we replace that tenant flag check with checking for available custom domains before managing the universal login template body.

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

@codecov-commenter
Copy link

Codecov Report

Base: 87.11% // Head: 86.99% // Decreases project coverage by -0.13% ⚠️

Coverage data is based on head (f561365) compared to base (ac1ab8e).
Patch coverage: 15.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #446      +/-   ##
==========================================
- Coverage   87.11%   86.99%   -0.13%     
==========================================
  Files          42       42              
  Lines        9192     9202      +10     
==========================================
- Hits         8008     8005       -3     
- Misses        910      920      +10     
- Partials      274      277       +3     
Impacted Files Coverage Δ
internal/provider/resource_auth0_branding.go 78.94% <15.00%> (-5.00%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@sergiught sergiught force-pushed the issue-432/DXCDT-348-ul-branding branch from f561365 to acd3143 Compare January 27, 2023 16:19
d.SetId("")
return diag.Diagnostics{
{
Severity: diag.Warning,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Decided to set this to a warning instead of an error when trying to destroy the auth0_branding resource.

@sergiught sergiught marked this pull request as ready for review January 27, 2023 16:23
@sergiught sergiught requested a review from a team as a code owner January 27, 2023 16:23
Copy link
Contributor

@willvedd willvedd left a comment

Choose a reason for hiding this comment

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

LGTM. It's odd API behavior to require a custom domain to delete the UL template but 🤷‍♂️ .

@sergiught sergiught merged commit 5414600 into main Jan 27, 2023
@sergiught sergiught deleted the issue-432/DXCDT-348-ul-branding branch January 27, 2023 16:58
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