From 560af163a1a48406a7394064a6bc1482a96a4280 Mon Sep 17 00:00:00 2001 From: gillespi314 <73313222+gillespi314@users.noreply.github.com> Date: Fri, 17 Mar 2023 16:16:18 -0500 Subject: [PATCH] Include MDM profile name and identifier in activity details (#10575) --- server/service/apple_mdm.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/service/apple_mdm.go b/server/service/apple_mdm.go index 6788770a3f..ce241b4c54 100644 --- a/server/service/apple_mdm.go +++ b/server/service/apple_mdm.go @@ -322,8 +322,10 @@ func (svc *Service) NewMDMAppleConfigProfile(ctx context.Context, teamID uint, r } if err := svc.ds.NewActivity(ctx, authz.UserFromContext(ctx), &fleet.ActivityTypeCreatedMacosProfile{ - TeamID: &teamID, - TeamName: &teamName, + TeamID: &teamID, + TeamName: &teamName, + ProfileName: newCP.Name, + ProfileIdentifier: newCP.Identifier, }); err != nil { return nil, ctxerr.Wrap(ctx, err, "logging activity for create mdm apple config profile") } @@ -491,8 +493,10 @@ func (svc *Service) DeleteMDMAppleConfigProfile(ctx context.Context, profileID u } if err := svc.ds.NewActivity(ctx, authz.UserFromContext(ctx), &fleet.ActivityTypeDeletedMacosProfile{ - TeamID: &teamID, - TeamName: &teamName, + TeamID: &teamID, + TeamName: &teamName, + ProfileName: cp.Name, + ProfileIdentifier: cp.Identifier, }); err != nil { return ctxerr.Wrap(ctx, err, "logging activity for delete mdm apple config profile") }