mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
feat(core): Add filtering, selection and pagination to users (#6994)
https://linear.app/n8n/issue/PAY-646
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import validator from 'validator';
|
||||
import { plainToInstance } from 'class-transformer';
|
||||
import { Authorized, Delete, Get, Patch, Post, RestController } from '@/decorators';
|
||||
import {
|
||||
compareHash,
|
||||
hashPassword,
|
||||
sanitizeUser,
|
||||
validatePassword,
|
||||
} from '@/UserManagement/UserManagementHelper';
|
||||
import { compareHash, hashPassword, validatePassword } from '@/UserManagement/UserManagementHelper';
|
||||
import { BadRequestError } from '@/ResponseHelper';
|
||||
import { validateEntity } from '@/GenericHelpers';
|
||||
import { issueCookie } from '@/auth/jwt';
|
||||
@@ -89,9 +84,11 @@ export class MeController {
|
||||
fields_changed: updatedKeys,
|
||||
});
|
||||
|
||||
await this.externalHooks.run('user.profile.update', [currentEmail, sanitizeUser(user)]);
|
||||
const publicUser = await this.userService.toPublic(user);
|
||||
|
||||
return sanitizeUser(user);
|
||||
await this.externalHooks.run('user.profile.update', [currentEmail, publicUser]);
|
||||
|
||||
return publicUser;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user