feat: add configuration, custom Auth and event handlers for Diamond Light Source#1497
Open
GrantDLS wants to merge 22 commits into
Open
feat: add configuration, custom Auth and event handlers for Diamond Light Source#1497GrantDLS wants to merge 22 commits into
GrantDLS wants to merge 22 commits into
Conversation
Contributor
|
@GrantDLS Is this PR ready to be reviewed? If so, could you add the label "review:please" |
Contributor
Author
I've done quite a bit of refactoring since I created the PR. Just adding a couple of tests for the email handler and I'll add the label. Thank you, @yoganandaness . |
Collaborator
|
Can you add an image of the email PROPOSAL_CO_PROPOSER_INVITES_UPDATED? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is to add the necessary configuration files, custom authorization class and email event handler for Diamond Light Source to be able to use User Office Project.
Motivation and Context
OAuthAuthorizationclass that it extends, except for it excludes some user attributes being pulled from the OAuth provider.getUASInstance()which reads the value of a.envvariable and falls back to a sensible default.PROPOSAL_SUBMITTEDandPROPOSAL_CO_PROPOSER_INVITES_UPDATED. The logic for building and sending each email type is separated into different files for readability.How Has This Been Tested
A test has been written for the email handler to ensure the correct email template is used for each event that we're handling.
Changes
There are only 2 changes to the core files of the code base:
externalTokenLogin(). I've extended the class, but needed access to the private methodgetUserRole(), so I've made it's access modifierprotectedrather thanprivate..envfile.Tests included/Docs Updated?
N/A