mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 14:40:39 +00:00
feat: adds pagination in users table
This commit is contained in:
@@ -57,6 +57,7 @@ import {
|
||||
TAdminSignUpDTO,
|
||||
TCountIdentitiesDTO,
|
||||
TCountOrganizationsDTO,
|
||||
TCountUsersDTO,
|
||||
TCreateOrganizationDTO,
|
||||
TGetOrganizationsDTO,
|
||||
TResendOrgInviteDTO
|
||||
@@ -670,6 +671,15 @@ export const superAdminServiceFactory = ({
|
||||
});
|
||||
};
|
||||
|
||||
const countUsers = async ({ searchTerm, adminsOnly }: TCountUsersDTO) => {
|
||||
const count = await userDAL.countUsersByFilter({
|
||||
searchTerm,
|
||||
adminsOnly
|
||||
});
|
||||
|
||||
return count;
|
||||
};
|
||||
|
||||
const deleteUser = async (userId: string) => {
|
||||
const superAdmins = await userDAL.find({
|
||||
superAdmin: true
|
||||
@@ -1151,6 +1161,7 @@ export const superAdminServiceFactory = ({
|
||||
adminSignUp,
|
||||
bootstrapInstance,
|
||||
getUsers,
|
||||
countUsers,
|
||||
deleteUser,
|
||||
getIdentities,
|
||||
countIdentities,
|
||||
|
||||
@@ -42,6 +42,11 @@ export type TCountIdentitiesDTO = {
|
||||
searchTerm: string;
|
||||
};
|
||||
|
||||
export type TCountUsersDTO = {
|
||||
searchTerm: string;
|
||||
adminsOnly: boolean;
|
||||
};
|
||||
|
||||
export type TCreateOrganizationDTO = {
|
||||
name: string;
|
||||
inviteAdminEmails: string[];
|
||||
|
||||
Reference in New Issue
Block a user