fix: check profiles and orgId from user.profiles apiv2 (#16249)
* fix: check profiles and orgId from user.profiles apiv2 * fixup! fix: check profiles and orgId from user.profiles apiv2 --------- Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
This commit is contained in:
co-authored by
Lauris Skraucis
parent
7759e6a029
commit
1690770d6a
@@ -30,6 +30,10 @@ export class UsersService {
|
||||
);
|
||||
}
|
||||
|
||||
getUserMainOrgId(user: UserWithProfile) {
|
||||
return this.getUserMainProfile(user)?.organizationId ?? user.organizationId;
|
||||
}
|
||||
|
||||
getUserProfileByOrgId(user: UserWithProfile, organizationId: number) {
|
||||
return user.profiles?.find((p) => p.organizationId === organizationId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user