Logo
Explore Help
Sign In
darkhelm/notifications-admin
1
0
Fork 0
You've already forked notifications-admin
mirror of https://github.com/GSA/notifications-admin.git synced 2026-08-11 09:28:27 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
f33e0d0e94eb1826e7de1673feaacf4708a18f66
notifications-admin/app/notify_client/__init__.py

9 lines
145 B
Python
Raw Normal View History

Send an email to the user when they change email address This PR changes the flow to change an email address. Once the user enter their password, they are told "Check your email". An email has been sent to them containing a link to notify which contains an encrypted token. The encrypted token contains the user id and new email address. Once the link is clicked the user's email address is updated to the new email address. They are redirected to the /user-profile page. Also in this commit is an update from flask.ext.login to flask_login.
2016-10-13 17:05:37 +01:00
from flask_login import current_user
Add created_by to all appropriate requests.
2016-04-15 11:08:19 +01:00
def _attach_current_user(data):
Make `_attach_current_user` a pure function Mutating dictionaries is gross and doesn’t work as you’d expect. Better to have the function return a new dictionary instead. Means we can be explicit that `created_by` is one of the allowed params when updating a service.
2016-08-11 14:20:43 +01:00
return dict(
created_by=current_user.id,
**data
)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.0 Page: 1303ms Template: 60ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API