Spring 安全性 UI - 禁止在 RegisterController 上发送邮件
Spring Security UI - Disable mail sending on RegisterController
我正在尝试禁用从 Register Spring Security UI's RegisterController 向新注册用户发送邮件,因为我的本地计算机上没有安装邮件服务器。
我已经按照 here 中的步骤操作,一切正常,直到它尝试发送注册邮件。
问题:
- SS UI 上是否有禁用邮件发送的可配置参数?
- 如果第 1 点的答案是否定的,禁用它的正确方法是什么?修改并构建 SS UI 插件 或 子类 RegisterController?
环境:
- Grails 2.4.4
- Spring 安全性 UI 1.0-RC2
- Spring 安全核心 2.0-RC4
SS UI 上没有用于禁用发送电子邮件的配置参数。根据 documentation,正确的方法是使用 s2-ui-override
脚本。这允许您定位要覆盖的 package/section。
来自文档:
The plugin's controllers and GSPs are easily overridden using the
s2ui-override script. The general syntax for running the script is
grails s2ui-override <type> <controller-package>
The script will copy an empty controller that extends the
corresponding plugin controller into your application so you can
override individual actions and methods as needed. It also copies the
controller's GSPs. The exceptions are 'auth' and 'layout' which only
copy GSPs.
我正在尝试禁用从 Register Spring Security UI's RegisterController 向新注册用户发送邮件,因为我的本地计算机上没有安装邮件服务器。
我已经按照 here 中的步骤操作,一切正常,直到它尝试发送注册邮件。
问题:
- SS UI 上是否有禁用邮件发送的可配置参数?
- 如果第 1 点的答案是否定的,禁用它的正确方法是什么?修改并构建 SS UI 插件 或 子类 RegisterController?
环境:
- Grails 2.4.4
- Spring 安全性 UI 1.0-RC2
- Spring 安全核心 2.0-RC4
SS UI 上没有用于禁用发送电子邮件的配置参数。根据 documentation,正确的方法是使用 s2-ui-override
脚本。这允许您定位要覆盖的 package/section。
来自文档:
The plugin's controllers and GSPs are easily overridden using the s2ui-override script. The general syntax for running the script is
grails s2ui-override <type> <controller-package>
The script will copy an empty controller that extends the corresponding plugin controller into your application so you can override individual actions and methods as needed. It also copies the controller's GSPs. The exceptions are 'auth' and 'layout' which only copy GSPs.