Skip to content

Commit b8254e0

Browse files
committed
Merge branch 'main' into 42290-wipe-activity
2 parents 119b8e0 + c4b3089 commit b8254e0

20 files changed

Lines changed: 739 additions & 4 deletions

File tree

frontend/interfaces/activity.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ export enum ActivityType {
163163
AddedMicrosoftEntraTenant = "added_microsoft_entra_tenant",
164164
DeletedMicrosoftEntraTenant = "deleted_microsoft_entra_tenant",
165165
ClearedPasscode = "cleared_passcode",
166+
EnabledManagedLocalAccount = "enabled_managed_local_account",
167+
DisabledManagedLocalAccount = "disabled_managed_local_account",
168+
ViewedManagedLocalAccount = "read_managed_local_account",
169+
CreatedManagedLocalAccount = "created_managed_local_account",
166170
}
167171

168172
/** This is a subset of ActivityType that are shown only for the host past activities */
@@ -186,7 +190,9 @@ export type IHostPastActivityType =
186190
| ActivityType.CanceledSetupExperience
187191
| ActivityType.InstalledCertificate
188192
| ActivityType.ResentCertificate
189-
| ActivityType.ClearedPasscode;
193+
| ActivityType.ClearedPasscode
194+
| ActivityType.ViewedManagedLocalAccount
195+
| ActivityType.CreatedManagedLocalAccount;
190196

191197
/** This is a subset of ActivityType that are shown only for the host upcoming activities */
192198
export type IHostUpcomingActivityType =
@@ -469,4 +475,9 @@ export const ACTIVITY_TYPE_TO_FILTER_LABEL: Record<ActivityType, string> = {
469475
[ActivityType.InstalledCertificate]: "Installed certificate",
470476
[ActivityType.EditedEnrollSecrets]: "Edited enroll secrets",
471477
[ActivityType.ClearedPasscode]: "Cleared passcode",
478+
[ActivityType.EnabledManagedLocalAccount]: "Turned on managed local account",
479+
[ActivityType.DisabledManagedLocalAccount]:
480+
"Turned off managed local account",
481+
[ActivityType.ViewedManagedLocalAccount]: "Viewed managed account",
482+
[ActivityType.CreatedManagedLocalAccount]: "Created managed account",
472483
};

frontend/interfaces/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ export interface IMdmConfig {
8484
require_all_software_macos: boolean | null;
8585
lock_end_user_info: boolean | null;
8686
};
87+
macos_setup: {
88+
enable_managed_local_account?: boolean;
89+
};
8790
macos_migration: IMacOsMigrationSettings;
8891
windows_updates: {
8992
deadline_days: number | null;

frontend/interfaces/host.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ export interface IOSSettings {
129129
detail: string;
130130
password_available: boolean;
131131
};
132+
managed_local_account?: {
133+
status: string | null;
134+
password_available: boolean;
135+
};
132136
certificates: IHostAndroidCert[];
133137
}
134138

@@ -258,6 +262,15 @@ export interface IHostRecoveryLockPasswordResponse {
258262
};
259263
}
260264

265+
export interface IHostManagedAccountPasswordResponse {
266+
host_id: number;
267+
managed_account_password: {
268+
username: string;
269+
password: string;
270+
updated_at: string;
271+
};
272+
}
273+
261274
export interface IHostIssues {
262275
total_issues_count: number;
263276
critical_vulnerabilities_count?: number; // Premium

frontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tsx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,54 @@ const TAGGED_TEMPLATES = {
512512
</>
513513
);
514514
},
515+
enabledManagedLocalAccount: (activity: IActivity) => {
516+
return (
517+
<>
518+
{" "}
519+
enabled managed local accounts for hosts assigned to the{" "}
520+
{activity.details?.team_name ? (
521+
<>
522+
<b>{activity.details.team_name}</b> fleet.
523+
</>
524+
) : (
525+
"hosts with no fleet."
526+
)}
527+
</>
528+
);
529+
},
530+
disabledManagedLocalAccount: (activity: IActivity) => {
531+
return (
532+
<>
533+
{" "}
534+
disabled managed local accounts for hosts assigned to the{" "}
535+
{activity.details?.team_name ? (
536+
<>
537+
<b>{activity.details.team_name}</b> fleet.
538+
</>
539+
) : (
540+
"hosts with no fleet."
541+
)}
542+
</>
543+
);
544+
},
545+
viewedManagedLocalAccount: (activity: IActivity) => {
546+
return (
547+
<>
548+
{" "}
549+
viewed the managed local account on{" "}
550+
<b>{activity.details?.host_display_name}</b>.
551+
</>
552+
);
553+
},
554+
createdManagedLocalAccount: (activity: IActivity) => {
555+
return (
556+
<>
557+
{" "}
558+
created a managed local account for{" "}
559+
<b>{activity.details?.host_display_name}</b>.
560+
</>
561+
);
562+
},
515563
createdAppleOSProfile: (activity: IActivity, isPremiumTier: boolean) => {
516564
const profileName = activity.details?.profile_name;
517565
return (
@@ -1923,6 +1971,18 @@ const getDetail = (activity: IActivity, isPremiumTier: boolean) => {
19231971
case ActivityType.RotatedHostRecoveryLockPassword: {
19241972
return TAGGED_TEMPLATES.rotatedHostRecoveryLockPassword(activity);
19251973
}
1974+
case ActivityType.EnabledManagedLocalAccount: {
1975+
return TAGGED_TEMPLATES.enabledManagedLocalAccount(activity);
1976+
}
1977+
case ActivityType.DisabledManagedLocalAccount: {
1978+
return TAGGED_TEMPLATES.disabledManagedLocalAccount(activity);
1979+
}
1980+
case ActivityType.ViewedManagedLocalAccount: {
1981+
return TAGGED_TEMPLATES.viewedManagedLocalAccount(activity);
1982+
}
1983+
case ActivityType.CreatedManagedLocalAccount: {
1984+
return TAGGED_TEMPLATES.createdManagedLocalAccount(activity);
1985+
}
19261986
case ActivityType.CreatedAppleOSProfile: {
19271987
return TAGGED_TEMPLATES.createdAppleOSProfile(activity, isPremiumTier);
19281988
}

0 commit comments

Comments
 (0)