feat: improvement org member list (#13859)
* fix: sticky action bar and align checkbox * feat: make teams filterable and clickable, total members * fix: update members count --------- Co-authored-by: sean-brydon <[email protected]> Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
3 files changed
+23
-12
No files matched your search
@@ -1,4 +1,3 @@
|
||||
import { isOrganisationAdmin } from "@calcom/lib/server/queries/organisations";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
@@ -16,10 +15,6 @@ export async function getTeamsHandler({ ctx }: GetTeamsHandler) {
|
||||
|
||||
if (!currentUser.organizationId) throw new TRPCError({ code: "UNAUTHORIZED" });
|
||||
|
||||
// check if user is admin of organization
|
||||
if (!(await isOrganisationAdmin(currentUser?.id, currentUser.organizationId)))
|
||||
throw new TRPCError({ code: "UNAUTHORIZED" });
|
||||
|
||||
const allOrgTeams = await prisma.team.findMany({
|
||||
where: {
|
||||
parentId: currentUser.organizationId,
|
||||
|
||||
Reference in new issue
Block a user