-
Notifications
You must be signed in to change notification settings - Fork 18
fix(internet-header): add self admin url prop to override menu links #4936
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
base: release/v8
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 3e59033 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Related Previews |
…ink-for-the-selfadmin-when-the-logouturl-is-not-the-same-domain-as-the-user-profile
|
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 the config is not hosted or served by the Design System, we can't alter it. Also, the system serving it is due to be deprecated, so it probably won't make sense to update it there either.
const url = getLocation(logoutURL()); | ||
originUrl = url.origin; | ||
|
||
originUrl = platform.selfAdminOrigin ? platform.selfAdminOrigin : getLocation(logoutURL()).origin; |
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.
Just a nitpick, but since it's available, could as well use the nullish coalescing operator here.
originUrl = platform.selfAdminOrigin ? platform.selfAdminOrigin : getLocation(logoutURL()).origin; | |
originUrl = platform.selfAdminOrigin ?? getLocation(logoutURL()).origin; |
* Overrides the logout-url provided by the portal config. | ||
*/ | ||
@Prop() logoutUrl?: string; | ||
|
||
/** | ||
* Overrides the logout-url provided by the portal config. | ||
*/ | ||
@Prop() selfAdminOrigin?: string; |
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.
Can we be a bit more specific here? These properties don't have the same effect and this comment will show up as type hint in project devs IDEs.
📄 Description
In order to let users override the calculated menu links origin URL in the kpl login widget, a
selfAdminOrigin
prop has been added to the internet-header.