-
Notifications
You must be signed in to change notification settings - Fork 0
fix(auth): use new apiKeyId array
#33
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
Conversation
|
This PR will trigger a patch release when merged. |
| const apiKeyId = config?.access?.admin?.apiKeyId || orgConfig?.access?.admin?.apiKeyId; | ||
| if (apiKeyId.indexOf(profile.jti) < 0) { |
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.
use either site config apiKeyId array, or fallback to org, if there's no site config
src/support/AdminContext.js
Outdated
| if (attributes.orgConfig === undefined) { | ||
| const { org } = info; | ||
| if (org) { | ||
| this.attributes.orgConfig = await loadOrgConfig(this, org); | ||
| attributes.orgConfig = await loadOrgConfig(this, org); | ||
| } | ||
| } | ||
| return this.attributes.orgConfig; | ||
| return attributes.config; |
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.
org config is optional
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.
yes, but you only need to load it, if the request doesn't address a site
src/support/AdminContext.js
Outdated
| if (attributes.orgConfig === undefined) { | ||
| const { org } = info; | ||
| if (org) { | ||
| this.attributes.orgConfig = await loadOrgConfig(this, org); | ||
| attributes.orgConfig = await loadOrgConfig(this, org); | ||
| } | ||
| } | ||
| return this.attributes.orgConfig; | ||
| return attributes.config; |
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.
yes, but you only need to load it, if the request doesn't address a site
|
🎉 This PR is included in version 1.15.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
No description provided.