diff --git a/core/server/permissions/index.js b/core/server/permissions/index.js index c6796f683e..f450696b40 100644 --- a/core/server/permissions/index.js +++ b/core/server/permissions/index.js @@ -18,7 +18,7 @@ function hasActionsMap() { return _.any(exported.actionsMap, function (val, key) { /*jslint unparam:true*/ - return Object.hasOwnProperty(key); + return Object.hasOwnProperty.call(exported.actionsMap, key); }); } diff --git a/core/server/xmlrpc.js b/core/server/xmlrpc.js index 0b70520a98..2703896651 100644 --- a/core/server/xmlrpc.js +++ b/core/server/xmlrpc.js @@ -20,6 +20,14 @@ function ping(post) { return; } + // Don't ping for the welcome to ghost post. + // This also handles the case where during ghost's first run + // models.init() inserts this post but permissions.init() hasn't + // (can't) run yet. + if (post.slug === 'welcome-to-ghost') { + return; + } + // Need to require here because of circular dependency return config.urlForPost(require('./api').settings, post, true).then(function (url) {