wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
727 stars 712 forks source link

[B2B] Sub org level Email templates listed in Console UI doesn't show sub org level overriden branding, always show the inherited branding #20178

Open AnuradhaSK opened 2 months ago

AnuradhaSK commented 2 months ago

Describe the issue:

  1. Login to console
  2. Go to branding and apply theme colors. Check the login UIs and Email templates shown in the console UI
  3. Create a sub org and Switch to the sub org
  4. Go to the branding section and see the UI brandings and Email template branding - > It shows the inherited branding configs from the root
  5. Now, change the themes in sub org level.
  6. UIs will be updated according to the changes in step 5
  7. But listed email templates doesn't show the changes done in step 5
  8. If you try an email sending scenario in sub org level, the sent mail has the branding config changes done in step 5

https://github.com/wso2/product-is/assets/25483865/c3f37436-6260-4f12-9b27-a371f11657d5

AnuradhaSK commented 2 months ago

The root cause for the issue:

Style & Text section invokes <host>/o/<org-id>/api/server... API path to get resolved branding for org

Screenshot 2024-04-10 at 16 44 45

Email Templates invokes <host>/t/<root tenant>/o/api/server.. API path to get resolved branding for org. Since this API is an open endpoint, the org is not derived from the token. Therefore, <host>/o/<org-id>/api/server.. API should be invoked

Screenshot 2024-04-10 at 16 45 05