mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
updated revoke session middleware to allow self or admin or global mod invocation, tweaked tests a bit
This commit is contained in:
@@ -13,13 +13,9 @@ sessionController.revoke = function (req, res, next) {
|
||||
}
|
||||
|
||||
var _id;
|
||||
var uid;
|
||||
var uid = res.locals.uid;
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
user.getUidByUserslug(req.params.userslug, next);
|
||||
},
|
||||
function (_uid, next) {
|
||||
uid = _uid;
|
||||
if (!uid) {
|
||||
return next(new Error('[[error:no-session-found]]'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user