mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-14 17:50:44 +02:00
fix: regression from user helper refactor
This commit is contained in:
@@ -105,7 +105,7 @@ editController.email = async function (req, res, next) {
|
||||
|
||||
async function renderRoute(name, req, res) {
|
||||
const [isAdmin, { username, userslug }, hasPassword] = await Promise.all([
|
||||
privileges.admin.can('admin:users', res.locals.uid),
|
||||
privileges.admin.can('admin:users', req.uid),
|
||||
user.getUserFields(res.locals.uid, ['username', 'userslug']),
|
||||
user.hasPassword(res.locals.uid),
|
||||
]);
|
||||
|
||||
@@ -15,7 +15,7 @@ infoController.get = async function (req, res) {
|
||||
|
||||
const [{ username, userslug }, isPrivileged] = await Promise.all([
|
||||
user.getUserFields(res.locals.uid, ['username', 'userslug']),
|
||||
user.isPrivileged(res.locals.uid),
|
||||
user.isPrivileged(req.uid),
|
||||
]);
|
||||
const [history, sessions, usernames, emails, notes] = await Promise.all([
|
||||
user.getModerationHistory(res.locals.uid),
|
||||
|
||||
Reference in New Issue
Block a user