diff --git a/.vscode/launch.json b/.vscode/launch.json index e8f4c409c8fb..ba5cb9a0aceb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "cwd": "${file}" }, { - "command": "npm run start-api", + "command": "npm run start-swa", "name": "Run emulator", "request": "launch", "type": "node-terminal" diff --git a/package.json b/package.json index 7d4a99103c8f..967975c415d8 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "changelog": "auto-changelog --starting-version 3.0.0 --commit-limit false --hide-credit", "eject": "react-scripts eject", "lint": "eslint \"src/**/*.js\"", - "start": "react-scripts start", + "start": "set HTTPS=true&&set SSL_CRT_FILE=./.vscode/cert.crt&&set SSL_KEY_FILE=./.vscode/key.key&&react-scripts start", "test": "react-scripts test", "test:cov": "npm test -- --coverage --watchAll=false", "test:debug": "react-scripts --inspect-brk test --runInBand", - "start-api": "swa start --ssl --ssl-cert ./.vscode/cert.crt --ssl-key ./.vscode/key.key --swa-config-location .vscode http://localhost:3000 --api-location http://localhost:7071", + "start-swa": "swa start --ssl --ssl-cert ./.vscode/cert.crt --ssl-key ./.vscode/key.key --swa-config-location .vscode https://localhost:3000 --api-location http://localhost:7071", "prepare": "husky install" }, "config": { @@ -98,7 +98,7 @@ "stylelint-order": "^5.0.0" }, "engines": { - "node": "16", + "node": "18", "npm": ">=7" } } diff --git a/src/components/forms/RFFComponents.js b/src/components/forms/RFFComponents.js index bda737a33a19..a360ec2fc49e 100644 --- a/src/components/forms/RFFComponents.js +++ b/src/components/forms/RFFComponents.js @@ -7,6 +7,7 @@ import { CFormSwitch, CFormTextarea, CSpinner, + CTooltip, } from '@coreui/react' import Select from 'react-select' import AsyncSelect from 'react-select/async' @@ -75,9 +76,14 @@ RFFCFormCheck.propTypes = { ...sharedPropTypes, } +function ConditionWrapper({ condition, wrapper, children }) { + return condition ? wrapper(children) : children +} + export const RFFCFormSwitch = ({ name, label, + helpText, sublabel, className = 'mb-3', validate, @@ -86,19 +92,28 @@ export const RFFCFormSwitch = ({ return ( {({ meta, input }) => ( -
- - {input.value && } - {sublabel} -
+ ( + + {children} + + )} + > +
+ + {input.value && } + {sublabel} +
+
)}
) @@ -106,6 +121,7 @@ export const RFFCFormSwitch = ({ RFFCFormSwitch.propTypes = { ...sharedPropTypes, + helpText: PropTypes.string, } export const RFFCFormInput = ({ diff --git a/src/data/standards.json b/src/data/standards.json index db21afee83f6..5139f1e4b311 100644 --- a/src/data/standards.json +++ b/src/data/standards.json @@ -2,7 +2,7 @@ { "name": "standards.MailContacts.GeneralContact.Enabled", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.MailContacts.GeneralContact.Mail", @@ -13,7 +13,7 @@ { "name": "standards.MailContacts.SecurityContact.Enabled", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.MailContacts.SecurityContact.Mail", @@ -24,7 +24,7 @@ { "name": "standards.MailContacts.MarketingContact.Enabled", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.MailContacts.MarketingContact.Mail", @@ -35,7 +35,7 @@ { "name": "standards.MailContacts.TechContact.Enabled", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.MailContacts.TechContact.Mail", @@ -46,35 +46,35 @@ { "name": "standards.AuditLog", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable the Unified Audit Log" }, { "name": "standards.AnonReportDisable", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Usernames instead of pseudo anonymised names in reports" }, { "name": "standards.DisableGuestDirectory", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Restrict guest user access to directory objects" }, { "name": "standards.ModernAuth", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Modern Authentication" }, { "name": "standards.DisableBasicAuth", "cat": "Global", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Basic Authentication" }, @@ -88,21 +88,21 @@ { "name": "standards.PWnumberMatchingRequiredState", "cat": "AAD", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Passwordless with Number Matching" }, { "cat": "AAD", "name": "standards.PWdisplayAppInformationRequiredState", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Passwordless with Location information and Number Matching" }, { "cat": "AAD", "name": "standards.PWcompanionAppAllowedState.Enabled", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "Select", "label": "Select value", @@ -123,7 +123,7 @@ { "cat": "AAD", "name": "standards.TAP.Enabled", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "Select", "label": "Select TAP Lifetime", @@ -144,35 +144,35 @@ { "cat": "AAD", "name": "standards.SecurityDefaults", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Security Defaults" }, { "cat": "AAD", "name": "standards.PasswordExpireDisabled", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Do not expire passwords" }, { "cat": "AAD", "name": "standards.DisableSecurityGroupUsers", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Security Group creation by users" }, { "cat": "AAD", "name": "standards.DisableTenantCreation", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable M365 Tenant creation by users" }, { "cat": "AAD", "name": "standards.OauthConsent.Enabled", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.OauthConsent.AllowedApps", @@ -183,70 +183,70 @@ { "cat": "AAD", "name": "standards.LegacyMFA", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable per-user MFA for all user (Legacy, Requires DAP.)" }, { "cat": "AAD", "name": "standards.LegacyMFACleanup", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Remove Legacy MFA if SD or CA is active" }, { "cat": "AAD", "name": "standards.NudgeMFA.enable", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Request to setup Authenticator if not setup yet." }, { "cat": "AAD", "name": "standards.NudgeMFA.disable", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disables the request to setup Authenticator if setup." }, { "cat": "AAD", "name": "standards.DisableSelfServiceLicenses", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Self Service Licensing" }, { "cat": "AAD", "name": "standards.DisableM365GroupUsers", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable M365 Group creation by users" }, { "cat": "AAD", "name": "standards.UndoOauth", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Undo App Consent Standard" }, { "cat": "AAD", "name": "standards.DisableGuests", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Guest accounts that have not logged on for 90 days" }, { "cat": "AAD", "name": "standards.EnableFIDO2", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable FIDO2 capabilities" }, { "name": "standards.OutBoundSpamAlert.Enabled", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.OutBoundSpamAlert.OutboundSpamContact", @@ -257,49 +257,49 @@ { "name": "standards.DisableSharedMailbox", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Shared Mailbox AAD accounts" }, { "name": "standards.DelegateSentItems", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Set mailbox Sent Items delegation (Sent items for shared mailboxes)" }, { "name": "standards.SendFromAlias", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Allow users to send from their alias addresses" }, { "name": "standards.AutoExpandArchive", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Auto-expanding archives" }, { "name": "standards.SpoofWarn.enable", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable Spoofing warnings for Outlook (This e-mail is external identifiers)" }, { "name": "standards.SpoofWarn.disable", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Spoofing warnings for Outlook (This e-mail is external identifiers)" }, { "name": "standards.DisableViva", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable daily Insight/Viva reports" }, @@ -320,7 +320,7 @@ { "name": "standards.ActivityBasedTimeout", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable 1 hour Activity based Timeout" }, @@ -328,7 +328,7 @@ { "name": "standards.calDefault.Enabled", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "Select", "label": "Select Sharing Level", @@ -369,21 +369,21 @@ { "name": "standards.UserSubmissions.enable", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Enable the built-in Report button in Outlook" }, { "name": "standards.UserSubmissions.disable", "cat": "Exchange", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable the built-in Report button in Outlook" }, { "name": "standards.intuneDeviceReg.Enabled", "cat": "Intune", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.intuneDeviceReg.max", @@ -394,7 +394,7 @@ { "name": "standards.intuneDeviceRetirementDays.Enabled", "cat": "Intune", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.intuneDeviceRetirementDays.days", @@ -405,7 +405,7 @@ { "name": "standards.sharingCapability.Enabled", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "Select", "label": "Select Sharing Level", @@ -434,7 +434,7 @@ { "name": "standards.ExcludedfileExt.Enabled", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": { "type": "input", "name": "standards.ExcludedfileExt.ext", @@ -445,70 +445,77 @@ { "name": "standards.disableMacSync", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Do not allow Mac devices to sync using OneDrive" }, { "name": "standards.DisableReshare", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable Resharing by External Users" }, { "name": "standards.DeletedUserRentention", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Retain a deleted user OneDrive for 1 year" }, { "name": "standards.DisableUserSiteCreate", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Disable site creation by standard users" }, { "name": "standards.unmanagedSync", "cat": "SharePoint", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Only allow users to sync OneDrive from AAD joined devices" }, + { + "name": "standards.DisableAddShortcutsToOneDrive", + "cat": "SharePoint", + "helpText": "When the feature is disabled the option Add shortcut to My files will be removed; any folders that have already been added will remain on the user's computer.", + "addedComponent": null, + "label": "Disable Add Shortcuts To OneDrive" + }, { "name": "standards.IntuneTemplate.enabled", "cat": "templates", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Intune Templates" }, { "name": "standards.GroupTemplate.enabled", "cat": "templates", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Group Templates" }, { "name": "standards.ExConnector.enabled", "cat": "templates", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Exchange Connector Templates" }, { "name": "standards.ConditionalAccess.enabled", "cat": "templates", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Conditional Access Templates" }, { "name": "standards.TransportRuleTemplate.enabled", "cat": "templates", - "helpText": "This is the default helptext", + "helpText": "", "addedComponent": null, "label": "Transport Rule Templates" } diff --git a/src/views/home/Home.js b/src/views/home/Home.js index 957c36d4e933..9e3741288987 100644 --- a/src/views/home/Home.js +++ b/src/views/home/Home.js @@ -115,7 +115,7 @@ const Home = () => { }, { label: 'Azure', - link: `https://portal.azure.com/?tid=${currentTenant.defaultDomainName}`, + link: `https://portal.azure.com/#@${currentTenant.customerId}`, icon: faServer, }, { diff --git a/src/views/tenant/standards/ApplyStandard.js b/src/views/tenant/standards/ApplyStandard.js index 4b687d57cdcb..a01959cefcc3 100644 --- a/src/views/tenant/standards/ApplyStandard.js +++ b/src/views/tenant/standards/ApplyStandard.js @@ -136,7 +136,12 @@ const ApplyStandard = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -179,7 +184,12 @@ const ApplyStandard = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -222,7 +232,12 @@ const ApplyStandard = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -265,7 +280,12 @@ const ApplyStandard = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -308,7 +328,12 @@ const ApplyStandard = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( diff --git a/src/views/tenant/standards/ListAppliedStandards.js b/src/views/tenant/standards/ListAppliedStandards.js index 26912a7b6d89..01cd41c41be2 100644 --- a/src/views/tenant/standards/ListAppliedStandards.js +++ b/src/views/tenant/standards/ListAppliedStandards.js @@ -183,9 +183,14 @@ const ListAppliedStandards = () => { .filter((obj) => obj.cat === 'Global') .map((item, key) => ( <> - {console.log(item.name)} - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -218,7 +223,13 @@ const ListAppliedStandards = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -251,7 +262,13 @@ const ListAppliedStandards = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -284,7 +301,13 @@ const ListAppliedStandards = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? ( @@ -317,7 +340,13 @@ const ListAppliedStandards = () => { .map((item, key) => ( <> - + {item.addedComponent && ( {item.addedComponent.type === 'Select' ? (