role fix
This commit is contained in:
1 parent
0dd977eeef
commit
b4d127c6ce
3 files changed
+6
-3
No files matched your search
@@ -436,7 +436,7 @@ class AuthService implements IAuthService {
|
||||
throw new ApiError("Organization entitlement error");
|
||||
}
|
||||
|
||||
const orgRoles = await this.roleRepository.findById(
|
||||
const orgRoles = await this.roleRepository.findByIdAndOrgId(
|
||||
orgMembership.roleId || "",
|
||||
org.id
|
||||
);
|
||||
|
||||
@@ -55,7 +55,10 @@ class InviteService implements IInviteService {
|
||||
teamRoleId: string
|
||||
) => {
|
||||
try {
|
||||
const role = await this.roleRepository.findById(teamRoleId, orgId);
|
||||
const role = await this.roleRepository.findByIdAndOrgId(
|
||||
teamRoleId,
|
||||
orgId
|
||||
);
|
||||
|
||||
if (!role) {
|
||||
throw new ApiError("Role not found", 404);
|
||||
|
||||
@@ -72,7 +72,7 @@ class MeService implements IMeService {
|
||||
throw new ApiError("Organization not found");
|
||||
}
|
||||
|
||||
const orgRole = await this.roleRepository.findById(
|
||||
const orgRole = await this.roleRepository.findByIdAndOrgId(
|
||||
orgMembership.roleId || "",
|
||||
org.id
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user