-
Notifications
You must be signed in to change notification settings - Fork 267
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
base: master
Are you sure you want to change the base?
Add pre auth and tenant switch improvement for central deployment related authentication #7291
Conversation
🦋 Changeset detectedThe changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. |
apps/console/src/auth.html
Outdated
@@ -223,6 +225,20 @@ | |||
return serverOrigin + getTenantPath(tenantDomain); | |||
} | |||
|
|||
function getADUApiPath(path, tenantDomain) { |
There was a problem hiding this comment.
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 :)
52544f6
to
066a888
Compare
.changeset/tasty-crews-rule.md
Outdated
@@ -0,0 +1,5 @@ | |||
--- | |||
"@wso2is/console": patch |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
apps/console/src/auth.html
Outdated
* @param {string} tenantDomain - Tenant domain. | ||
* @returns {string} Constructed API path. | ||
*/ | ||
function getADUApiPath(path, tenantDomain) { |
There was a problem hiding this comment.
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: { |
There was a problem hiding this comment.
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)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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[]; |
There was a problem hiding this comment.
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?
adus: ADU[]; | |
deploymentUnits: DeploymentUnit[]; |
@@ -134,16 +137,17 @@ export const AddTenantWizard: FunctionComponent<AddTenantWizardPropsInterface> = | |||
setTenantDuplicate={ setIsTenantDuplicate } | |||
isCheckingTenantExistence={ isCheckingTenantExistence } | |||
setCheckingTenantExistence={ setCheckingTenantExistence } | |||
adus={ adus } |
There was a problem hiding this comment.
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.
c2201d6
to
fbb1a84
Compare
fbb1a84
to
19e90ca
Compare
Purpose
Checklist
Security checks