mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 03:33:27 -05:00
Merge pull request #14483 from overleaf/ab-fix-delete-user-button-check
[web] Show remove from group button instead of delete user if enrollment is {} GitOrigin-RevId: d344b199be70d4661f25088962bd8158b443aed9
This commit is contained in:
parent
9787edcc8e
commit
796a92841f
3 changed files with 5 additions and 5 deletions
|
@ -173,7 +173,7 @@ export default function ManagedUserDropdownButton({
|
||||||
) : null}
|
) : null}
|
||||||
</MenuItemButton>
|
</MenuItemButton>
|
||||||
) : null}
|
) : null}
|
||||||
{user.enrollment ? (
|
{user.enrollment?.managedBy ? (
|
||||||
<MenuItemButton
|
<MenuItemButton
|
||||||
className="delete-user-action"
|
className="delete-user-action"
|
||||||
data-testid="delete-user-action"
|
data-testid="delete-user-action"
|
||||||
|
|
|
@ -61,7 +61,7 @@ describe('ManagedUserDropdownButton', function () {
|
||||||
last_name: 'User',
|
last_name: 'User',
|
||||||
invite: true,
|
invite: true,
|
||||||
last_active_at: new Date(),
|
last_active_at: new Date(),
|
||||||
enrollment: undefined,
|
enrollment: {},
|
||||||
isEntityAdmin: undefined,
|
isEntityAdmin: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ describe('ManagedUserDropdownButton', function () {
|
||||||
last_name: 'User',
|
last_name: 'User',
|
||||||
invite: false,
|
invite: false,
|
||||||
last_active_at: new Date(),
|
last_active_at: new Date(),
|
||||||
enrollment: undefined,
|
enrollment: {},
|
||||||
isEntityAdmin: true,
|
isEntityAdmin: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export type UserEnrollment = {
|
export type UserEnrollment = {
|
||||||
managedBy: string
|
managedBy?: string
|
||||||
enrolledAt: Date
|
enrolledAt?: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export type User = {
|
export type User = {
|
||||||
|
|
Loading…
Reference in a new issue