mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 14:43:08 +03:00
Added missing validator to updateSetup method
- This is the code corresponding to processArgs function in v1 authentication.updateSetup method
This commit is contained in:
parent
c7a836b926
commit
589b78d575
@ -3,6 +3,10 @@ module.exports = {
|
|||||||
return require('./passwordreset');
|
return require('./passwordreset');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get setup() {
|
||||||
|
return require('./setup');
|
||||||
|
},
|
||||||
|
|
||||||
get posts() {
|
get posts() {
|
||||||
return require('./posts');
|
return require('./posts');
|
||||||
},
|
},
|
||||||
|
12
core/server/api/v2/utils/validators/input/setup.js
Normal file
12
core/server/api/v2/utils/validators/input/setup.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
const debug = require('ghost-ignition').debug('api:v2:utils:validators:input:updateSetup');
|
||||||
|
const common = require('../../../../../lib/common');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
updateSetup(apiConfig, frame) {
|
||||||
|
debug('resetPassword');
|
||||||
|
|
||||||
|
if (!frame.options.context || !frame.options.context.user) {
|
||||||
|
throw new common.errors.NoPermissionError({message: common.i18n.t('errors.api.authentication.notTheBlogOwner')});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user