diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 000000000000..1b849791174c --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,43 @@ +module.exports = { + env: { + browser: true, + es6: true, + node: true, + }, + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + ecmaFeatures: { + jsx: true, + }, + }, + settings: { + react: { + version: 'detect', + }, + 'import/resolver': { + // added for `import {component} from 'src/component' style imports` + 'eslint-import-resolver-custom-alias': { + alias: { + src: './src', + }, + extensions: ['.js', '.jsx', '.json'], + }, + }, + }, + extends: [ + 'eslint:recommended', + 'plugin:import/recommended', + 'plugin:react/recommended', + 'plugin:react/jsx-runtime', + 'plugin:react-hooks/recommended', + 'plugin:prettier/recommended', + ], + plugins: ['react-hooks', 'import'], + rules: { + 'no-unused-vars': 'off', + 'react/prop-types': 'warn', + // this rule is annoying on strings with quotes in them + 'react/no-unescaped-entities': 'off', + }, +} diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 862eb01e8d94..000000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "settings": { - "react": { - "version": "detect" - } - }, - "extends": ["plugin:prettier/recommended"], - "plugins": ["react-hooks"], - "rules": {} -} diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index af41440ebfc9..de839daf7a30 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -11,7 +11,7 @@ body: - Please search the existing feature request to see if there has been a similar issue filed. - - If a feature has been filed before, but not followed up by a contributor, you can develop the feature yourself by checking the development documentation [here](https://cipp.app/docs/dev/). + - If a feature has been filed before, but not followed up by a contributor, you can develop the feature yourself by checking the development documentation [here](https://docs.cipp.app/dev-documentation/cipp-dev-guide/setting-up-for-local-development). - Repeat feature requests are allowed if the previous request has been closed for more than 30 days diff --git a/.github/workflows/Check_for_Version_Update.yml b/.github/workflows/Check_for_Version_Update.yml index 4a0b3f8d4c76..ec6f3e68769b 100644 --- a/.github/workflows/Check_for_Version_Update.yml +++ b/.github/workflows/Check_for_Version_Update.yml @@ -1,11 +1,12 @@ --- name: Check for Version Update -on: # yamllint disable-line rule:truthy +on: pull_request: branches: [master, main] workflow_dispatch: jobs: build: + if: github.repository_owner == 'KelvinTegelaar' name: 'Check for Version Update' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/Close_Stale_Issues_and_PRs.yml b/.github/workflows/Close_Stale_Issues_and_PRs.yml index 7eff0bf2f619..41dc1be235d7 100644 --- a/.github/workflows/Close_Stale_Issues_and_PRs.yml +++ b/.github/workflows/Close_Stale_Issues_and_PRs.yml @@ -1,15 +1,16 @@ --- name: 'Close stale issues and PRs' -on: # yamllint disable-line rule:truthy +on: schedule: - cron: '30 1 * * *' jobs: stale: + if: github.repository_owner == 'KelvinTegelaar' runs-on: ubuntu-latest steps: - uses: actions/stale@v4 with: - stale-issue-message: 'This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.' + stale-issue-message: 'This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://docs.cipp.app/dev-documentation/contributing-to-the-code . Please notify the team if you are working on this yourself.' close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.' stale-issue-label: 'no-activity' exempt-issue-labels: 'planned' diff --git a/.github/workflows/CodeQL_Analyser.yml b/.github/workflows/CodeQL_Analyser.yml index b5c18a50df14..043426a1d69f 100644 --- a/.github/workflows/CodeQL_Analyser.yml +++ b/.github/workflows/CodeQL_Analyser.yml @@ -1,12 +1,13 @@ --- name: 'CodeQL' -on: # yamllint disable-line rule:truthy +on: pull_request: branches: [master, main, dev, react] schedule: - cron: '26 17 * * 0' jobs: analyze: + if: github.repository_owner == 'KelvinTegelaar' name: Analyze runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/Comment_on_Issues.yml b/.github/workflows/Comment_on_Issues.yml index 80574ef5d235..6b65991389d6 100644 --- a/.github/workflows/Comment_on_Issues.yml +++ b/.github/workflows/Comment_on_Issues.yml @@ -1,12 +1,12 @@ --- name: Add Comment -on: # yamllint disable-line rule:truthy +on: issues: types: - labeled jobs: add-comment_bug: - if: github.event.label.name == 'unconfirmed-by-user' + if: github.repository_owner == 'KelvinTegelaar' && github.event.label.name == 'unconfirmed-by-user' runs-on: ubuntu-latest permissions: issues: write @@ -17,23 +17,14 @@ jobs: issue-number: ${{ github.event.issue.number }} body: | Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/ - If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.". + If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug." Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!". add-comment_fr: - if: github.event.label.name == 'enhancement' + if: github.repository_owner == 'KelvinTegelaar' && github.event.label.name == 'enhancement' runs-on: ubuntu-latest permissions: issues: write steps: - name: Add Comment - uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae - with: - issue-number: ${{ github.event.issue.number }} - body: | - Thank you for creating a feature request! - Your current priority is set to "No Priority". No Priority Feature requests automatically get closed in two days if a contributor does not accept the FR. - - If you are a sponsor you can request an upgrade of priority. To upgrade the priority type "I would like to upgrade the priority". - If you want this feature to be integrated you can always do this yourself by checking out our contributions guide at https://cipp.app/docs/dev/. Contributors to the CIPP project reserve the right to close feature requests at will. - If you'd like this feature request to be assigned to you, please comment "I would like to work on this please!". + uses: peter-evans/create-or-update diff --git a/.github/workflows/Label_Issues.yml b/.github/workflows/Label_Issues.yml index ecb261bd730a..a0ec41e47894 100644 --- a/.github/workflows/Label_Issues.yml +++ b/.github/workflows/Label_Issues.yml @@ -1,12 +1,12 @@ --- name: Label Issues -on: # yamllint disable-line rule:truthy +on: issues: types: - opened jobs: label_issues_bugs: - if: contains(github.event.issue.title,'Bug') + if: github.repository_owner == 'KelvinTegelaar' && contains(github.event.issue.title, 'Bug') runs-on: ubuntu-latest permissions: issues: write @@ -17,7 +17,7 @@ jobs: add-labels: 'unconfirmed-by-user' repo-token: ${{ secrets.GITHUB_TOKEN }} label_issues_frs: - if: contains(github.event.issue.title,'Feature') + if: github.repository_owner == 'KelvinTegelaar' && contains(github.event.issue.title, 'Feature') runs-on: ubuntu-latest permissions: issues: write diff --git a/.github/workflows/Node_Project_Check.yml b/.github/workflows/Node_Project_Check.yml index a1e9155aa4ba..b135c589ea7b 100644 --- a/.github/workflows/Node_Project_Check.yml +++ b/.github/workflows/Node_Project_Check.yml @@ -1,6 +1,6 @@ --- name: NodeJS Project Check -on: # yamllint disable-line rule:truthy +on: pull_request: branches: - main @@ -10,6 +10,7 @@ concurrency: cancel-in-progress: false jobs: install-build: + if: github.repository_owner == 'KelvinTegelaar' name: NPM Install and Build runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/label_sponsor_requests.yml b/.github/workflows/label_sponsor_requests.yml index b6096b76b35e..479cad06c728 100644 --- a/.github/workflows/label_sponsor_requests.yml +++ b/.github/workflows/label_sponsor_requests.yml @@ -1,12 +1,12 @@ --- name: Label Issues -on: # yamllint disable-line rule:truthy +on: issues: types: - opened jobs: label_issues_bugs: - if: contains(github.event.issue.title,'Bug') + if: github.repository_owner == 'KelvinTegelaar' && contains(github.event.issue.title, 'Bug') runs-on: ubuntu-latest permissions: issues: write @@ -14,4 +14,4 @@ jobs: - name: Sponsor Labels uses: JasonEtco/is-sponsor-label-action@v1.2.0 with: - label: 'Sponsor Request' + label: 'Sponsor Request' diff --git a/.node-version b/.node-version index b6a7d89c68e0..3c032078a4a2 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -16 +18 diff --git a/index.html b/index.html new file mode 100644 index 000000000000..0715762939da --- /dev/null +++ b/index.html @@ -0,0 +1,37 @@ + + + +
+ + + + + ++
Click the button below to start a permissions check.
Click the button below to start a check for general GDAP settings.
Domains
{graphrequest.isFetching &&+
{getNestedValue(graphrequest.data.Data, info.value)}
)} diff --git a/src/views/tenant/standards/DomainsAnalyser.js b/src/views/tenant/standards/DomainsAnalyser.jsx similarity index 97% rename from src/views/tenant/standards/DomainsAnalyser.js rename to src/views/tenant/standards/DomainsAnalyser.jsx index 6b8bd505d756..dbe792deaf7e 100644 --- a/src/views/tenant/standards/DomainsAnalyser.js +++ b/src/views/tenant/standards/DomainsAnalyser.jsx @@ -65,6 +65,10 @@ function DeleteAction({ domain }) { ) } +DeleteAction.propTypes = { + domain: PropTypes.string, +} + function checkDomain(tenantDomain) { return (