This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 2 files changed +17
-1
lines changed
client/src/components/ProfileCard
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
import config from "../../config" ;
2
2
import * as groupLib from "../../lib/groups" ;
3
+ import { getSingleOrg } from "../../services/user-org" ;
3
4
4
5
/**
5
6
* Checks if the skill exists by using its provider id and external id
@@ -425,3 +426,18 @@ export async function updateUserInDb(
425
426
}
426
427
}
427
428
}
429
+
430
+ /**
431
+ * Determines if the user is deactivated in the current org
432
+ * @param {Object } profile The user profile
433
+ */
434
+ export function isUserDeactivated ( profile ) {
435
+ const { externalProfiles } = profile ;
436
+ const organizationId = getSingleOrg ( ) ;
437
+
438
+ const externalProfile = externalProfiles . find (
439
+ ( ep ) => ep . organizationId === organizationId
440
+ ) ;
441
+
442
+ return externalProfile . isInactive ;
443
+ }
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ function ProfileCard({
58
58
avatarColor,
59
59
// Indicates if the user has been deactivated. The user is still shown in this case, but with a
60
60
// clear indicator about its deactivated status.
61
- isDeactivated : false ,
61
+ isDeactivated : cardHelper . isUserDeactivated ( profile ) ,
62
62
} ;
63
63
} else {
64
64
// Data is already in the format seen above. No further processing needed
You can’t perform that action at this time.
0 commit comments