Merge pull request #219 from dougtoppin/fix-verify-confirm

Fix verify confirm
This commit is contained in:
Ritchie Martori 2014-03-31 12:02:48 -07:00
commit 51d3ff892a
1 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,12 @@ var options = {
principalId: Role.OWNER, principalId: Role.OWNER,
permission: ACL.ALLOW, permission: ACL.ALLOW,
property: "updateAttributes" property: "updateAttributes"
},
{
principalType: ACL.ROLE,
principalId: Role.EVERYONE,
permission: ACL.ALLOW,
property: "confirm"
} }
], ],
relations: { relations: {
@ -306,6 +312,7 @@ User.prototype.verify = function (options, fn) {
var template = loopback.template(options.template); var template = loopback.template(options.template);
Email.send({ Email.send({
to: options.to || user.email, to: options.to || user.email,
from: options.from,
subject: options.subject || 'Thanks for Registering', subject: options.subject || 'Thanks for Registering',
text: options.text, text: options.text,
html: template(options) html: template(options)