Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
dd88eb0c
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
dd88eb0c
编写于
11月 06, 2018
作者:
J
James Lopez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Provide email notification on email updates
上级
6e9179ab
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
32 addition
and
0 deletion
+32
-0
app/views/devise/mailer/email_changed.html.haml
app/views/devise/mailer/email_changed.html.haml
+12
-0
app/views/devise/mailer/email_changed.text.erb
app/views/devise/mailer/email_changed.text.erb
+10
-0
changelogs/unreleased/security-email-change-notification.yml
changelogs/unreleased/security-email-change-notification.yml
+5
-0
config/initializers/devise.rb
config/initializers/devise.rb
+3
-0
doc/workflow/notifications.md
doc/workflow/notifications.md
+2
-0
未找到文件。
app/views/devise/mailer/email_changed.html.haml
0 → 100644
浏览文件 @
dd88eb0c
=
email_default_heading
(
"Hello,
#{
@resource
.
name
}
!"
)
-
if
@resource
.
try
(
:unconfirmed_email?
)
%p
We're contacting you to notify you that your email is being changed to
#{
@resource
.
reload
.
unconfirmed_email
}
.
-
else
%p
We're contacting you to notify you that your email has been changed to
#{
@resource
.
email
}
.
%p
If you did not initiate this change, please contact your administrator
immediately.
app/views/devise/mailer/email_changed.text.erb
0 → 100644
浏览文件 @
dd88eb0c
Hello,
<%=
@resource
.
name
%>
!
<%
if
@resource
.
try
(
:unconfirmed_email?
)
%>
We're contacting you to notify you that your email is being changed to
<%=
@resource
.
reload
.
unconfirmed_email
%>
.
<%
else
%>
We're contacting you to notify you that your email has been changed to
<%=
@resource
.
email
%>
.
<%
end
%>
If you did not initiate this change, please contact your administrator
immediately.
changelogs/unreleased/security-email-change-notification.yml
0 → 100644
浏览文件 @
dd88eb0c
---
title
:
Provide email notification when a user changes their email address
merge_request
:
author
:
type
:
security
config/initializers/devise.rb
浏览文件 @
dd88eb0c
...
...
@@ -103,6 +103,9 @@ Devise.setup do |config|
# Send a notification email when the user's password is changed
config
.
send_password_change_notification
=
true
# Send a notification email when the user's email is changed
config
.
send_email_changed_notification
=
true
# ==> Configuration for :validatable
# Range for password length. Default is 6..128.
config
.
password_length
=
8
..
128
...
...
doc/workflow/notifications.md
浏览文件 @
dd88eb0c
...
...
@@ -64,6 +64,8 @@ Below is the table of events users can be notified of:
|------------------------------|-------------------------------------------------------------------|------------------------------|
| New SSH key added | User | Security email, always sent. |
| New email added | User | Security email, always sent. |
| Email changed | User | Security email, always sent. |
| Password changed | User | Security email, always sent. |
| New user created | User | Sent on user creation, except for omniauth (LDAP)|
| User added to project | User | Sent when user is added to project |
| Project access level changed | User | Sent when user project access level is changed |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录