-
Notifications
You must be signed in to change notification settings - Fork 21
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
Move supplier user creation invite emails to notify #747
Merged
Wynndow
merged 6 commits into
master
from
move-supplier-user-creation-invite-emails-to-notify
Sep 25, 2017
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6393783
Pull in utils 28.5.0
Wynndow 804bb27
Send supplier create emails with Notify
Wynndow e967c66
Remove old redirect for user creation
Wynndow c995bbc
Import external views from utils
Wynndow bcfd835
Remove unused `invite_user_email` template
Wynndow f61f5ae
Use `hash_string` from utils instead of `hash_email`
Wynndow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,15 @@ class Config(object): | |
DM_DATA_API_URL = None | ||
DM_DATA_API_AUTH_TOKEN = None | ||
DM_MANDRILL_API_KEY = None | ||
DM_NOTIFY_API_KEY = None | ||
DM_CLARIFICATION_QUESTION_EMAIL = '[email protected]' | ||
DM_FRAMEWORK_AGREEMENTS_EMAIL = '[email protected]' | ||
|
||
NOTIFY_TEMPLATES = { | ||
'create_user_account': '1d1e38a6-744a-4d5a-84af-aefccde70a6c', | ||
'invite_contributor': '1cca85e8-d647-46e6-9c0d-6af90b9e69b0' | ||
} | ||
|
||
DM_AGREEMENTS_BUCKET = None | ||
DM_COMMUNICATIONS_BUCKET = None | ||
DM_DOCUMENTS_BUCKET = None | ||
|
@@ -39,10 +45,6 @@ class Config(object): | |
|
||
DEBUG = False | ||
|
||
RESET_PASSWORD_EMAIL_NAME = 'Digital Marketplace Admin' | ||
RESET_PASSWORD_EMAIL_FROM = '[email protected]' | ||
RESET_PASSWORD_EMAIL_SUBJECT = 'Reset your Digital Marketplace password' | ||
|
||
INVITE_EMAIL_NAME = 'Digital Marketplace Admin' | ||
INVITE_EMAIL_FROM = '[email protected]' | ||
INVITE_EMAIL_SUBJECT = 'Your Digital Marketplace invitation' | ||
|
@@ -56,7 +58,6 @@ class Config(object): | |
|
||
DM_GENERIC_NOREPLY_EMAIL = '[email protected]' | ||
|
||
CREATE_USER_SUBJECT = 'Create your Digital Marketplace account' | ||
SECRET_KEY = None | ||
SHARED_EMAIL_KEY = None | ||
RESET_PASSWORD_SALT = 'ResetPasswordSalt' | ||
|
@@ -100,6 +101,8 @@ class Test(Config): | |
WTF_CSRF_ENABLED = False | ||
SERVER_NAME = 'localhost' | ||
DM_MANDRILL_API_KEY = 'MANDRILL' | ||
DM_NOTIFY_API_KEY = "not_a_real_key-00000000-fake-uuid-0000-000000000000" | ||
|
||
SHARED_EMAIL_KEY = "KEY" | ||
DM_CLARIFICATION_QUESTION_EMAIL = '[email protected]' | ||
|
||
|
@@ -137,6 +140,8 @@ class Development(Config): | |
DM_ASSETS_URL = "https://{}.s3-eu-west-1.amazonaws.com".format(DM_SUBMISSIONS_BUCKET) | ||
|
||
DM_MANDRILL_API_KEY = "not_a_real_key" | ||
DM_NOTIFY_API_KEY = "not_a_real_key-00000000-fake-uuid-0000-000000000000" | ||
|
||
SHARED_EMAIL_KEY = "very_secret" | ||
SECRET_KEY = 'verySecretKey' | ||
|
||
|
@@ -162,6 +167,14 @@ class Preview(Live): | |
class Production(Live): | ||
FEATURE_FLAGS_CONTRACT_VARIATION = enabled_since('2016-08-23') | ||
|
||
NOTIFY_TEMPLATES = { | ||
'create_user_account': '84f5d812-df9d-4ab8-804a-06f64f5abd30', | ||
'invite_contributor': '5eefe42d-1694-4388-8908-991cdfba0a71' | ||
} | ||
|
||
# Check we didn't forget any live template IDs | ||
assert NOTIFY_TEMPLATES.keys() == Config.NOTIFY_TEMPLATES.keys() | ||
|
||
|
||
class Staging(Production): | ||
FEATURE_FLAGS_CONTRACT_VARIATION = enabled_since('2016-08-22') | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ Flask==0.10.1 | |
Flask-Login==0.2.11 | ||
Flask-WTF==0.12 | ||
|
||
git+https://github.com/alphagov/digitalmarketplace-utils.git@28.1.0#egg=digitalmarketplace-utils==28.1.0 | ||
git+https://github.com/alphagov/digitalmarketplace-utils.git@28.5.0#egg=digitalmarketplace-utils==28.5.0 | ||
git+https://github.com/alphagov/[email protected]#egg=digitalmarketplace-content-loader==4.2.0 | ||
git+https://github.com/alphagov/[email protected]#egg=digitalmarketplace-apiclient==10.4.0 |
Oops, something went wrong.
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.
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.
Is
hash_email
used by anything else or could we delete the helper function as well? There's a shared one in dmutils now that we should probably switch to if it is used.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.
It's used in app/main/view/frameworks, but could probable update to use the utils one. I'm going to check they have the same functionality though.
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.
Yep, have removed the helper and used the one from utils.