Skip to content

Commit

Permalink
Merge pull request #19 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
[pull] dev from KelvinTegelaar:dev
  • Loading branch information
markheydon authored Feb 14, 2025
2 parents acf3d6d + 118129d commit 27860d3
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 6 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/cipp_dev_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CIPP Frontend Build

on:
push:
branches:
- dev
workflow_dispatch:

permissions:
contents: write

jobs:
build:
if: github.event.repository.fork == false
name: Build and Upload CIPP Frontend
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3

# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.18.1'

# Install dependencies
- name: Install Dependencies
run: yarn install

# Build the project
- name: Build Project
run: npm run build

# Create ZIP File in a New Source Directory
- name: Prepare and Zip Build Files
run: |
mkdir -p build
cp staticwebapp.config.json out/
zip -r build/dev.zip out
# Upload to Azure Blob Storage
- name: Azure Blob Upload
uses: LanceMcCarthy/[email protected]
with:
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
container_name: cipp
source_folder: build/
destination_folder: /
delete_if_exists: true
52 changes: 52 additions & 0 deletions .github/workflows/cipp_frontend_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CIPP Frontend Build

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
build:
if: github.event.repository.fork == false
name: Build and Upload CIPP Frontend
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3

# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.18.1'

# Install dependencies
- name: Install Dependencies
run: npm install

# Build the project
- name: Build Project
run: npm run build

# Create ZIP File in a New Source Directory
- name: Prepare and Zip Build Files
run: |
mkdir -p build
zip -r build/latest.zip out
# Upload to Azure Blob Storage
- name: Azure Blob Upload
uses: LanceMcCarthy/[email protected]
with:
connection_string: ${{ secrets.AZURE_CONNECTION_STRING }}
container_name: cipp
source_folder: build/
destination_folder: /
delete_if_exists: true

13 changes: 13 additions & 0 deletions deployment/AzureDeploymentTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,19 @@
"functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]",
"functionAppRegion": "[resourceGroup().location]"
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"name": "[guid(resourceGroup().id, variables('funcAppName'), 'Contributor')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
],
"properties": {
"roleDefinitionId": "[concat(subscription().id, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
"scope": "[resourceGroup().id]"
}
}
],
"outputs": {}
Expand Down
13 changes: 13 additions & 0 deletions deployment/AzureDeploymentTemplate_regionoptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,19 @@
"functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]",
"functionAppRegion": "[resourceGroup().location]"
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"name": "[guid(resourceGroup().id, variables('funcAppName'), 'Contributor')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"
],
"properties": {
"roleDefinitionId": "[concat(subscription().id, '/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]",
"scope": "[resourceGroup().id]"
}
}
],
"outputs": {}
Expand Down
2 changes: 1 addition & 1 deletion public/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "7.2.1"
"version": "7.2.2"
}
3 changes: 1 addition & 2 deletions src/components/CippWizard/CIPPDeploymentStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ export const CippDeploymentStep = (props) => {
placeholder="Enter the application secret. Leave blank to retain previous key."
validators={{
validate: (value) => {
const secretRegex =
/^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[0-9a-zA-Z]{40}$/;
const secretRegex = /^(?!^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)[A-Za-z0-9-_~.]{20,}$/;
return (
value === "" ||
secretRegex.test(value) ||
Expand Down
6 changes: 3 additions & 3 deletions src/pages/identity/administration/users/user/bec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const Page = () => {
const getUserMessage = () => {
if (!becPollingCall.data) return null;
if (becPollingCall.data.NewUsers && becPollingCall.data.NewUsers.length > 0) {
return "Suspicious new users have been found in the last 14 days. Please review the list below and take action as needed.";
return "New users have been found in the last 14 days. Please review the list below and take action as needed.";
}
return "No new users found.";
};
Expand All @@ -126,7 +126,7 @@ const Page = () => {
if (hasPotentialBreach) {
return "Potential Breach found.";
}
return "Suspicious new applications have been found. Please review the list below and take action as needed.";
return "New applications have been found. Please review the list below and take action as needed.";
}
return "No new applications found.";
};
Expand All @@ -137,7 +137,7 @@ const Page = () => {
becPollingCall.data.MailboxPermissionChanges &&
becPollingCall.data.MailboxPermissionChanges.length > 0
) {
return "Suspicious mailbox permission changes have been found.";
return "Mailbox permission changes have been found.";
}
return "No mailbox permission changes found.";
};
Expand Down

0 comments on commit 27860d3

Please sign in to comment.