Skip to content

Commit

Permalink
Add missing audit log events
Browse files Browse the repository at this point in the history
  • Loading branch information
onbuyuka committed Jan 30, 2025
1 parent 21254b9 commit 423368f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ codeunit 9871 "Security Group Impl."

FeatureTelemetry.LogUptake('0000JGO', SecurityGroupsTok, Enum::"Feature Uptake Status"::"Set up");
Session.LogSecurityAudit(SecurityGroupsTok, SecurityOperationResult::Success, StrSubstNo(SecurityGroupAddedLbl, GroupId, SecurityGroupUser."User Security ID"), AuditCategory::UserManagement);
Session.LogAuditMessage(StrSubstNo(SecurityGroupAddedLbl, GroupId, SecurityGroupUser."User Security ID"), SecurityOperationResult::Success, AuditCategory::UserManagement, 2, 0);
end;

procedure Delete(GroupCode: Code[20])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ page 9801 "User Subform"
PermissionSetLookupRecord: Record "Aggregate Permission Set";
User: Record User;
MultipleRoleIDErr: Label 'The permission set %1 is defined multiple times in this context. Use the lookup button to select the relevant permission set.', Comment = '%1 will be replaced with a Role ID code value from the Permission Set table';
PermissionSetAddedToUserLbl: Label 'The permission set %1 has been added to the user %2 by UserSecurityId %3.', Comment = '%1 - Role ID, %2 - UserSecurityId, %3 - Current UserSecurityId';
PermissionScope: Text;
PermissionSetNotFound: Boolean;

Expand All @@ -120,6 +121,7 @@ page 9801 "User Subform"
begin
User.TestField("User Name");
Rec.CalcFields("App Name", Rec."Role Name");
Session.LogAuditMessage(StrSubstNo(PermissionSetAddedToUserLbl, Rec."Role ID", rec."User Security ID", UserSecurityId()), SecurityOperationResult::Success, AuditCategory::UserManagement, 2, 0);
end;

trigger OnModifyRecord(): Boolean
Expand Down

0 comments on commit 423368f

Please sign in to comment.