mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
remove settings email
closes #5299 - removes settings/general email field from both client and server side - fixes tests to reflect removal of email
This commit is contained in:
parent
7190e1d2a3
commit
e69c8c89ac
@ -7,7 +7,6 @@ var Setting = DS.Model.extend(NProgressSaveMixin, ValidationEngine, {
|
||||
|
||||
title: DS.attr('string'),
|
||||
description: DS.attr('string'),
|
||||
email: DS.attr('string'),
|
||||
logo: DS.attr('string'),
|
||||
cover: DS.attr('string'),
|
||||
defaultLang: DS.attr('string'),
|
||||
|
@ -47,11 +47,6 @@
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label for="email-address">Email Address</label>
|
||||
{{input id="email-address" class="gh-input" name="general[email-address]" type="email" value=model.email autocapitalize="off" autocorrect="off"}}
|
||||
<p>Address to use for admin notifications</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="postsPerPage">Posts per page</label>
|
||||
|
@ -4,7 +4,6 @@ var SettingValidator = Ember.Object.create({
|
||||
var validationErrors = [],
|
||||
title = model.get('title'),
|
||||
description = model.get('description'),
|
||||
email = model.get('email'),
|
||||
postsPerPage = model.get('postsPerPage'),
|
||||
isPrivate = model.get('isPrivate'),
|
||||
password = model.get('password');
|
||||
@ -17,10 +16,6 @@ var SettingValidator = Ember.Object.create({
|
||||
validationErrors.push({message: 'Description is too long'});
|
||||
}
|
||||
|
||||
if (!validator.isEmail(email) || !validator.isLength(email, 0, 254)) {
|
||||
validationErrors.push({message: 'Supply a valid email address'});
|
||||
}
|
||||
|
||||
if (isPrivate && password === '') {
|
||||
validationErrors.push({message: 'Password must be supplied'});
|
||||
}
|
||||
|
@ -221,8 +221,6 @@ authentication = {
|
||||
}).then(function (user) {
|
||||
var userSettings = [];
|
||||
|
||||
userSettings.push({key: 'email', value: setupUser.email});
|
||||
|
||||
// Handles the additional values set by the setup screen.
|
||||
if (!_.isEmpty(setupUser.blogTitle)) {
|
||||
userSettings.push({key: 'title', value: setupUser.blogTitle});
|
||||
|
@ -20,13 +20,6 @@
|
||||
"description": {
|
||||
"defaultValue": "Just a blogging platform."
|
||||
},
|
||||
"email": {
|
||||
"defaultValue": "ghost@example.com",
|
||||
"validations": {
|
||||
"isNull": false,
|
||||
"isEmail": true
|
||||
}
|
||||
},
|
||||
"logo": {
|
||||
"defaultValue": ""
|
||||
},
|
||||
|
@ -35,7 +35,7 @@ describe('Authentication API', function () {
|
||||
name: 'test user',
|
||||
email: 'test@example.com',
|
||||
password: 'areallygoodpassword',
|
||||
title: 'a test blog'
|
||||
blogTitle: 'a test blog'
|
||||
},
|
||||
|
||||
send = mail.__get__('mail.send');
|
||||
|
@ -199,8 +199,7 @@ describe('Import', function () {
|
||||
var users = importedData[0],
|
||||
posts = importedData[1],
|
||||
settings = importedData[2],
|
||||
tags = importedData[3],
|
||||
exportEmail;
|
||||
tags = importedData[3];
|
||||
|
||||
// we always have 1 user, the default user we added
|
||||
users.length.should.equal(1, 'There should only be one user');
|
||||
@ -223,10 +222,6 @@ describe('Import', function () {
|
||||
// activeTheme should NOT have been overridden
|
||||
_.findWhere(settings, {key: 'activeTheme'}).value.should.equal('casper', 'Wrong theme');
|
||||
|
||||
// email address should have been overridden
|
||||
exportEmail = _.findWhere(exportData.data.settings, {key: 'email'}).value;
|
||||
_.findWhere(settings, {key: 'email'}).value.should.equal(exportEmail, 'Wrong email in settings');
|
||||
|
||||
// test tags
|
||||
tags.length.should.equal(exportData.data.tags.length, 'no new tags');
|
||||
|
||||
@ -371,8 +366,7 @@ describe('Import', function () {
|
||||
var users = importedData[0],
|
||||
posts = importedData[1],
|
||||
settings = importedData[2],
|
||||
tags = importedData[3],
|
||||
exportEmail;
|
||||
tags = importedData[3];
|
||||
|
||||
// we always have 1 user, the owner user we added
|
||||
users.length.should.equal(1, 'There should only be one user');
|
||||
@ -395,10 +389,6 @@ describe('Import', function () {
|
||||
// activeTheme should NOT have been overridden
|
||||
_.findWhere(settings, {key: 'activeTheme'}).value.should.equal('casper', 'Wrong theme');
|
||||
|
||||
// email address should have been overridden
|
||||
exportEmail = _.findWhere(exportData.data.settings, {key: 'email'}).value;
|
||||
_.findWhere(settings, {key: 'email'}).value.should.equal(exportEmail, 'Wrong email in settings');
|
||||
|
||||
// test tags
|
||||
tags.length.should.equal(exportData.data.tags.length, 'no new tags');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user