Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Purview] Add missing audit log events #2867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading