Skip to content
Merged
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
1 change: 1 addition & 0 deletions spfx/src/webparts/siteAdmin/SiteAdminWebPart.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"ReportsDocSearchFileExt": "csv doc docx dot dotx pdf pot potx pps ppsx ppt pptx txt xls xlsx xlt xltx",
"ReportsDocSearchKeywords": "phi pii ssn",
"ReportsDocSearchRegexPatterns": ".*(\\d{3}-\\d{2}-\\d{4}).* .*([0-9]{3}[\\s.-]?[0-9]{2}[\\s.-]?[0-9]{4}).*",
"ReportsSecureFileText": "This action will create unique permissions for the file and remove explicit permissions to groups that are flagging this file as overshared.\n\nIf access to the file is currently granted through a SharePoint group, then that group will be removed from the file's permissions. For example, if the \"Visitors Group\" contains the \"All Guests\" group; then the \"Visitors Group\" will be removed from the file's permissions.\n\nIt is recommended to review the file's permissions after securing it to ensure it is properly permissioned to the people who require access.",
"SensitivityLabelFileExt": "csv doc docx dot dotx pdf pot potx pps ppsx ppt pptx txt xls xlsx xlt xltx",
"SiteAttestation": false,
"SiteAttestationText": "This will confirm that you have completed your tasks defined by your governance for site administration.",
Expand Down
10 changes: 10 additions & 0 deletions spfx/src/webparts/siteAdmin/SiteAdminWebPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface ISiteAdminWebPartProps {
ReportsDocSearchFileExt: string;
ReportsDocSearchKeywords: string;
ReportsDocSearchRegexPatterns: string;
ReportsSecureFileText: string;
ReportsOversharedGroups: string;
SensitivityLabelFileExt: string;
SiteAttestation: boolean;
Expand Down Expand Up @@ -206,6 +207,7 @@ declare const SiteAdmin: {
docSearchKeywords?: string;
docSearchRegexPatterns?: string;
oversharedGroups?: string[];
secureFileText?: string;
sensitivityLabelFileExt?: string;
}
searchProps?: {
Expand Down Expand Up @@ -625,6 +627,13 @@ export default class SiteAdminWebPart extends BaseClientSideWebPart<ISiteAdminWe
});
}
}),
PropertyPaneTextField("ReportsSecureFileText", {
label: strings.ReportsSecureFileText,
description: "The text displayed for the secure file confirmation form.",
multiline: true,
rows: 6,
value: this.properties.ReportsSecureFileText
}),
]
},
{
Expand Down Expand Up @@ -923,6 +932,7 @@ export default class SiteAdminWebPart extends BaseClientSideWebPart<ISiteAdminWe
docSearchKeywords: this.properties.ReportsDocSearchKeywords,
docSearchRegexPatterns: this.properties.ReportsDocSearchRegexPatterns,
oversharedGroups: (this.properties.ReportsOversharedGroups || "").split(",").map(group => group.trim()),
secureFileText: this.properties.ReportsSecureFileText,
sensitivityLabelFileExt: this.properties.SensitivityLabelFileExt
},
searchProps: {
Expand Down
1 change: 1 addition & 0 deletions spfx/src/webparts/siteAdmin/loc/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ define([], function () {
"ReportsDocSearchKeywords": "Document Search Default Keywords",
"ReportsDocSearchRegexPatterns": "Document Search Default Regex Patterns",
"ReportsOversharedGroups": "Overshared Groups",
"ReportsSecureFileText": "Secure File Text",
"SensitivityLabelFileExt": "Sensitivity Label File Extensions",
"SitePropAttestationDate": "Site Attestation Date",
"SitePropAttestationUser": "Site Attestation User",
Expand Down
1 change: 1 addition & 0 deletions spfx/src/webparts/siteAdmin/loc/mystrings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ declare interface ISiteAdminWebPartStrings {
ReportsDocSearchKeywords: string;
ReportsDocSearchRegexPatterns: string;
ReportsOversharedGroups: string;
ReportsSecureFileText: string;
SensitivityLabelFileExt: string;
SitePropAttestationDate: string;
SitePropAttestationUser: string;
Expand Down
8 changes: 5 additions & 3 deletions src/reports/viewPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export class ViewPermissions {
static get OversharedGroups(): string[] { return this._oversharedGroups; }
static set OversharedGroups(value: string[]) { this._oversharedGroups = value; }

private static _secureFileText: string = "";
static get SecureFileText(): string { return this._secureFileText; }
static set SecureFileText(value: string) { this._secureFileText = value; }

// Returns the groups that are flagging the file as overshared
static getOversharedGroups(roles: Types.SP.RoleAssignmentOData[]): string[] {
let groups = [];
Expand Down Expand Up @@ -122,9 +126,7 @@ export class ViewPermissions {

// Set the content
CanvasForm.setBody(`
<p>This action will create unique permissions for the file and remove explicit permissions to groups that are flagging this file as overshared.</p>
<p>If access to the file is currently granted through a SharePoint group, then that group will be removed from the file's permissions. For example, if the "Visitors Group" contains the "All DoD Guests" group; then the "Visitors Group" will be removed from the file's permissions.</p>
<p>It is recommended to review the file's permissions after securing it to ensure it is properly permissioned to the people who require access.</p>
<p>${this.SecureFileText.replace(/\n/g, "<br/>")}</p>
<p>The following groups will be removed from the file's permissions:</p>
<ul></ul>
<div class="d-flex justify-content-end"></div>
Expand Down
4 changes: 3 additions & 1 deletion src/tabs/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface IReportProps {
docSearchKeywords?: string;
docSearchRegexPatterns?: string;
oversharedGroups?: string[];
secureFileText?: string;
sensitivityLabelFileExt?: string;
}

Expand Down Expand Up @@ -56,8 +57,9 @@ export class ReportsTab {
this._reportProps = appProps.reportProps;
this._searchProps = appProps.searchProps;

// Set the overshared groups
// Set the view permissions properties
ViewPermissions.OversharedGroups = appProps.reportProps.oversharedGroups || [];
ViewPermissions.SecureFileText = appProps.reportProps.secureFileText || "";

// Determine if this is in audit mode
this._auditOnly = !DataSource.IsAdmin || (appProps.auditOnly ? true : false);
Expand Down
Loading