mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
parent
2a6e9aac55
commit
7323258415
@ -15,7 +15,8 @@ const http = (apiImpl) => {
|
|||||||
user: req.user,
|
user: req.user,
|
||||||
context: {
|
context: {
|
||||||
api_key_id: (req.api_key && req.api_key.id) ? req.api_key.id : null,
|
api_key_id: (req.api_key && req.api_key.id) ? req.api_key.id : null,
|
||||||
user: ((req.user && req.user.id) || (req.user && models.User.isExternalUser(req.user.id))) ? req.user.id : null
|
user: ((req.user && req.user.id) || (req.user && models.User.isExternalUser(req.user.id))) ? req.user.id : null,
|
||||||
|
member: (req.member || null)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ describe('Unit: api/shared/http', function () {
|
|||||||
apiImpl.args[0][0].options.should.eql({
|
apiImpl.args[0][0].options.should.eql({
|
||||||
context: {
|
context: {
|
||||||
api_key_id: null,
|
api_key_id: null,
|
||||||
user: null
|
user: null,
|
||||||
|
member: null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user