File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
server/src/services/business Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ class AuthService implements IAuthService {
436436 throw new ApiError ( "Organization entitlement error" ) ;
437437 }
438438
439- const orgRoles = await this . roleRepository . findById (
439+ const orgRoles = await this . roleRepository . findByIdAndOrgId (
440440 orgMembership . roleId || "" ,
441441 org . id
442442 ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ class InviteService implements IInviteService {
5555 teamRoleId : string
5656 ) => {
5757 try {
58- const role = await this . roleRepository . findById ( teamRoleId , orgId ) ;
58+ const role = await this . roleRepository . findByIdAndOrgId (
59+ teamRoleId ,
60+ orgId
61+ ) ;
5962
6063 if ( ! role ) {
6164 throw new ApiError ( "Role not found" , 404 ) ;
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class MeService implements IMeService {
7272 throw new ApiError ( "Organization not found" ) ;
7373 }
7474
75- const orgRole = await this . roleRepository . findById (
75+ const orgRole = await this . roleRepository . findByIdAndOrgId (
7676 orgMembership . roleId || "" ,
7777 org . id
7878 ) ;
You can’t perform that action at this time.
0 commit comments