Skip to content

Commit

Permalink
Merge pull request #1259 from openedx/ENT-8956-fix-xml-download-btn
Browse files Browse the repository at this point in the history
[ENT-8956] - fix: missing href on xml download button
  • Loading branch information
hamzawaleed01 authored Jul 2, 2024
2 parents e74391e + e8d7c53 commit fbfdbab
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ PLOTLY_SERVER_URL='http://localhost:8050'
AUTH0_SELF_SERVICE_INTEGRATION='true'
MFE_CONFIG_API_URL='http://localhost:18000/api/mfe_config/v1'
DEMO_ENTEPRISE_UUID='set a valid enterprise uuid'
EDX_ACCESS_URL=''
1 change: 1 addition & 0 deletions .env.development-stage
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ LOGO_POWERED_BY_OPEN_EDX_URL_PNG="https://edx-cdn.org/v3/stage/open-edx-tag.png"
LOGO_POWERED_BY_OPEN_EDX_URL_SVG="https://edx-cdn.org/v3/stage/open-edx-tag.svg"
HOTJAR_VERSION=6
SESSION_COOKIE_DOMAIN=".stage.edx.org"
EDX_ACCESS_URL='https://2u-guid-staging.us.auth0.com'

# Cookie Policy Banner
COOKIE_POLICY_BANNER_VIEWED_NAME="edx-cookie-policy-viewed"
Expand Down
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ ENTERPRISE_SUPPORT_URL = ''
ENTERPRISE_SUPPORT_REVOKE_LICENSE_URL = ''
PLOTLY_SERVER_URL='http://localhost:8050'
DEMO_ENTEPRISE_UUID='set a valid enterprise uuid'
EDX_ACCESS_URL='https://2u-guid-staging.us.auth0.com'
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ const SSOConfigAuthorizeStep = () => {
const { testLink } = createSAMLURLs({
configuration, idpSlug, enterpriseSlug, learnerPortalEnabled,
});

/**
* Contains link to download service metadata XML which looks like:
* https://access.edx.org/samlp/metadata?connection=rwth-aachen-7cef5c13-7d67-460e-9962-3ec31f91ff20
* Built using enterprise slug and uuid
*/
const linkToDownloadMetadataXML =
formFields?.spMetadataUrl ||
`${configuration.EDX_ACCESS_URL}/samlp/metadata?connection=${enterpriseSlug}-${formFields?.uuid}`;

return (
<>
Expand Down Expand Up @@ -91,7 +100,7 @@ const SSOConfigAuthorizeStep = () => {
/>
</p>
<Row className="justify-content-center mb-4 ">
<Button as="a" href={formFields?.spMetadataUrl} target="_blank" rel="noopener noreferrer" variant="primary" iconAfter={Download}>
<Button as="a" href={linkToDownloadMetadataXML} target="_blank" rel="noopener noreferrer" variant="primary" iconAfter={Download}>
<FormattedMessage
id="adminPortal.settings.ssoConfigAuthorizeStep.downloadMetadataButton"
defaultMessage="edX Service Provider Metadata"
Expand Down
1 change: 1 addition & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ initialize({
FEATURE_CONTENT_HIGHLIGHTS: process.env.FEATURE_CONTENT_HIGHLIGHTS || hasFeatureFlagEnabled('CONTENT_HIGHLIGHTS') || null,
ENTERPRISE_SUPPORT_PROGRAM_OPTIMIZATION_URL: process.env.ENTERPRISE_SUPPORT_PROGRAM_OPTIMIZATION_URL || null,
ENTERPRISE_SUPPORT_LEARNER_CREDIT_URL: process.env.ENTERPRISE_SUPPORT_LEARNER_CREDIT_URL || null,
EDX_ACCESS_URL: process.env.EDX_ACCESS_URL || null,
});
},
},
Expand Down

0 comments on commit fbfdbab

Please sign in to comment.