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

Add pre auth and tenant switch improvement for central deployment related authentication #7291

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bhagyasakalanka
Copy link
Contributor

@bhagyasakalanka bhagyasakalanka commented Jan 10, 2025

Purpose

  • Add console pre auth related improvements for ADU authentication
  • Improve drop down to support ADU selection

Checklist

  • e2e cypress tests locally verified. (for internal contributers)
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Relevant backend changes deployed and verified
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

@wso2-jenkins-bot
Copy link
Contributor

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.85%. Comparing base (85ed6db) to head (19e90ca).
Report is 419 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7291   +/-   ##
=======================================
  Coverage   41.85%   41.85%           
=======================================
  Files          42       42           
  Lines         939      939           
  Branches      217      217           
=======================================
  Hits          393      393           
  Misses        546      546           
Flag Coverage Δ
@wso2is/core 41.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -223,6 +225,20 @@
return serverOrigin + getTenantPath(tenantDomain);
}

function getADUApiPath(path, tenantDomain) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a doc comment explaining the function, especially what ADU refers to :)

@bhagyasakalanka bhagyasakalanka force-pushed the central-deployment-imprs branch 6 times, most recently from 52544f6 to 066a888 Compare February 18, 2025 04:52
@bhagyasakalanka bhagyasakalanka changed the title Add pre auth improvement for central deployment related authentication Add pre auth and tenant switch improvement for central deployment related authentication Feb 18, 2025
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
Copy link
Contributor

Choose a reason for hiding this comment

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

Also add other changed features to changeset

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is an improvement, let's bump to minor

* @param {string} tenantDomain - Tenant domain.
* @returns {string} Constructed API path.
*/
function getADUApiPath(path, tenantDomain) {
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we keep this generic (such as getDeploymentUnitApiPath), without mentioning product names in open source repo

@@ -2715,6 +2715,13 @@ export const extensions: Extensions = {
" alphanumeric characters</2><3>begin with an alphabetic character</3>" +
"</3s>"
}
},
adu: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we add this to modules/i18n/src/translations/en-US/portals/tenants.ts. we are in the process of moving the console extension i18n to i18n module.

},
adu: {
label: "Region",
placeholder: "Select a region (E. g., us)",
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
placeholder: "Select a region (E. g., us)",
placeholder: "Select a region (e.g., US).",

@@ -38,6 +39,7 @@ import { AddTenantWizardForm, AddTenantWizardFormValuesInterface } from "../form
interface AddTenantWizardPropsInterface extends TestableComponentInterface {
openModal: boolean;
onCloseHandler: () => void;
adus: ADU[];
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not use abbreviations as interface members as it hurts readability. As previously suggested, shall we do something like this?

Suggested change
adus: ADU[];
deploymentUnits: DeploymentUnit[];

@@ -134,16 +137,17 @@ export const AddTenantWizard: FunctionComponent<AddTenantWizardPropsInterface> =
setTenantDuplicate={ setIsTenantDuplicate }
isCheckingTenantExistence={ isCheckingTenantExistence }
setCheckingTenantExistence={ setCheckingTenantExistence }
adus={ adus }
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use descriptive names for props as well.

@bhagyasakalanka bhagyasakalanka force-pushed the central-deployment-imprs branch 2 times, most recently from c2201d6 to fbb1a84 Compare February 20, 2025 11:54
@bhagyasakalanka bhagyasakalanka force-pushed the central-deployment-imprs branch from fbb1a84 to 19e90ca Compare February 20, 2025 12:13
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