breaking: remove socket.emit('user.search')

This commit is contained in:
Barış Soner Uşaklı
2021-12-12 11:38:15 -05:00
parent 5e232f17f6
commit 0d694c781c
4 changed files with 55 additions and 78 deletions

View File

@@ -312,6 +312,9 @@ async function canDeleteUids(uids) {
}
usersAPI.search = async function (caller, data) {
if (!data) {
throw new Error('[[error:invalid-data]]');
}
const [allowed, isPrivileged] = await Promise.all([
privileges.global.can('search:users', caller.uid),
user.isPrivileged(caller.uid),