From 673ff33767170e23112b1ee6da812404a10f591b Mon Sep 17 00:00:00 2001 From: Brion Date: Sun, 21 Jan 2024 14:43:16 +0530 Subject: [PATCH 1/3] Remove `Tenant` references --- .../create-console-role-wizard-permissions-form.scss | 2 +- .../create-console-role-wizard-permissions-form.tsx | 8 ++++++-- modules/i18n/src/models/namespaces/console-ns.ts | 8 ++++++++ modules/i18n/src/translations/en-US/portals/console.ts | 8 ++++++++ modules/i18n/src/translations/fr-FR/portals/console.ts | 8 ++++++++ modules/i18n/src/translations/si-LK/portals/console.ts | 8 ++++++++ 6 files changed, 39 insertions(+), 3 deletions(-) diff --git a/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.scss b/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.scss index dbd5d038c7e..1519f274216 100644 --- a/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.scss +++ b/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.scss @@ -6,7 +6,7 @@ margin: 10px 0; .permissions-accordion-label { - width: 33%; + width: 40%; flex-shrink: 0; } diff --git a/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.tsx b/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.tsx index fd4dcce437d..cc5a84188c6 100644 --- a/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.tsx +++ b/apps/console/src/features/console-settings/components/console-roles/create-console-role-wizard/create-console-role-wizard-permissions-form.tsx @@ -333,7 +333,9 @@ const CreateConsoleRoleWizardPermissionsForm: FunctionComponent - Tenant Permissions + + { t("console:consoleSettings.roles.add.tenantPermissions.label") } + { filteredTenantAPIResourceCollections?.apiResourceCollections?.length } Permissions @@ -435,7 +437,9 @@ const CreateConsoleRoleWizardPermissionsForm: FunctionComponent - Organization Permissions + + { t("console:consoleSettings.roles.add.organizationPermissions.label") } + { filteredOrganizationAPIResourceCollections?.apiResourceCollections?.length } Permissions diff --git a/modules/i18n/src/models/namespaces/console-ns.ts b/modules/i18n/src/models/namespaces/console-ns.ts index 67e142bd41e..f5c920ac4ba 100644 --- a/modules/i18n/src/models/namespaces/console-ns.ts +++ b/modules/i18n/src/models/namespaces/console-ns.ts @@ -538,6 +538,14 @@ export interface ConsoleNS { tabLabel: string; }; roles: { + add: { + organizationPermissions: { + label: string; + }; + tenantPermissions: { + label: string; + }; + }; tabLabel: string; permissionLevels: { edit: string; diff --git a/modules/i18n/src/translations/en-US/portals/console.ts b/modules/i18n/src/translations/en-US/portals/console.ts index b9953ae8dd2..8fdf48f5d4b 100644 --- a/modules/i18n/src/translations/en-US/portals/console.ts +++ b/modules/i18n/src/translations/en-US/portals/console.ts @@ -722,6 +722,14 @@ export const console: ConsoleNS = { tabLabel: "Protocol" }, roles: { + add: { + organizationPermissions: { + label: "Organization Permissions" + }, + tenantPermissions: { + label: "Root Organization Permissions" + } + }, tabLabel: "Roles", permissionLevels: { edit: "Edit", diff --git a/modules/i18n/src/translations/fr-FR/portals/console.ts b/modules/i18n/src/translations/fr-FR/portals/console.ts index a834c7dd3d1..0a3ce70ee02 100755 --- a/modules/i18n/src/translations/fr-FR/portals/console.ts +++ b/modules/i18n/src/translations/fr-FR/portals/console.ts @@ -720,6 +720,14 @@ export const console: ConsoleNS = { tabLabel: "Protocole" }, roles: { + add: { + organizationPermissions: { + label: "Autorisation d'organisation" + }, + tenantPermissions: { + label: "Autorisation d'organisation racinaire" + } + }, tabLabel: "Les rôles", permissionLevels: { edit: "Modifier", diff --git a/modules/i18n/src/translations/si-LK/portals/console.ts b/modules/i18n/src/translations/si-LK/portals/console.ts index 768f5da9392..99b6a1f6a77 100755 --- a/modules/i18n/src/translations/si-LK/portals/console.ts +++ b/modules/i18n/src/translations/si-LK/portals/console.ts @@ -728,6 +728,14 @@ export const console: ConsoleNS = { tabLabel: "ප්රොටෝකෝලය" }, roles: { + add: { + organizationPermissions: { + label: "සංවිධාන අවසරයි" + }, + tenantPermissions: { + label: "මූල සංවිධාන අවසර" + } + }, tabLabel: "භූමිකාවන්", permissionLevels: { edit: "සංස්කරණය කරන්න", From 0e70f8c7f968693397bd7bd6e4972bb0e1b8e111 Mon Sep 17 00:00:00 2001 From: Brion Date: Sun, 21 Jan 2024 14:46:57 +0530 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A6=8B=20Add=20changeset?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/cool-sheep-arrive.md | 9 +++ .../asgardeo-auth-spa-version-updater.yml | 76 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 .changeset/cool-sheep-arrive.md create mode 100644 .github/workflows/asgardeo-auth-spa-version-updater.yml diff --git a/.changeset/cool-sheep-arrive.md b/.changeset/cool-sheep-arrive.md new file mode 100644 index 00000000000..69d65e087a5 --- /dev/null +++ b/.changeset/cool-sheep-arrive.md @@ -0,0 +1,9 @@ +--- +"@wso2is/console": patch +"@wso2is/i18n": patch +"@wso2is/myaccount": patch +"@wso2is/common": patch +"@wso2is/core": patch +--- + +Rename `Tenant Permissions` -> `Root Organization Permissions` diff --git a/.github/workflows/asgardeo-auth-spa-version-updater.yml b/.github/workflows/asgardeo-auth-spa-version-updater.yml new file mode 100644 index 00000000000..9a8a18ea71c --- /dev/null +++ b/.github/workflows/asgardeo-auth-spa-version-updater.yml @@ -0,0 +1,76 @@ +name: 🌝 Nightly Version Bump + +on: + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }} + BOT_USERNAME: ${{ secrets.RELEASE_BOT_USER_NAME }} + BOT_EMAIL: ${{ secrets.RELEASE_BOT_EMAIL }} + BASE_BRANCH: 'main' + +jobs: + bump-version: + name: 🌝 Nightly Version Bump + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [lts/*] + maven-version: [3.8.6] + java-version: [1.8] + pnpm-version: [8.7.4] + steps: + - name: ⬇️ Checkout + id: checkout + uses: actions/checkout@v2.3.3 + with: + fetch-depth: 0 + + - name: 🌟 Set up Git + run: | + git config user.name ${{ env.BOT_USERNAME }}} + git config user.email ${{ env.BOT_EMAIL }}} + + - name: 🏷️ Set branch name + id: set-branch-name + run: | + base_branch=${{ env.BASE_BRANCH }} + version_bump_branch="asgardeo-auth-spa-version-bump/$base_branch" + echo "Setting branch name to: $version_bump_branch" + echo "VERSION_BUMP_BRANCH=${version_bump_branch}" >> $GITHUB_ENV + + - name: 🚀 Create version bump branch + id: create-branch + run: | + echo "Checking out a new branch: $VERSION_BUMP_BRANCH" + git checkout -b "$VERSION_BUMP_BRANCH" + + - name: Validate existing `@asgardeo/auth-spa` version + id: validate-existing-auth-spa-version + run: | + existing_version=$(grep -oP 'auth-spa-\K[0-9]+\.[0-9]+\.[0-9]+' apps/console/src/public/auth-spa-3.0.1.min.js) + echo "EXISTING_ASGARDEO_AUTH_VERSION=${existing_version}" >> $GITHUB_ENV + - name: Check if existing and latest versions match + id: check-version-match + run: | + existing_version=$(grep -oP 'auth-spa-\K[0-9]+\.[0-9]+\.[0-9]+' apps/console/src/public/auth-spa-3.0.1.min.js) + latest_release=$(curl -s https://api.github.com/repos/asgardeo/asgardeo-auth-spa-sdk/releases/latest | jq -r '.tag_name') + + # if [ "$existing_version" == "$latest_release" ]; then + # echo "Versions match. Aborting further steps." + # exit 0 + # fi + + echo "EXISTING_ASGARDEO_AUTH_VERSION=${existing_version}" >> $GITHUB_ENV + echo "LATEST_ASGARDEO_AUTH_VERSION=${latest_release}" >> $GITHUB_ENV + + echo "Existing version: $existing_version" + echo "Latest release: $latest_release" + # - name: 🎉 Create pull request + # id: create-pr + # run: | + # echo "VERSION_BUMP_BRANCH: $VERSION_BUMP_BRANCH" + # echo "Creating pull request from $base_branch to $VERSION_BUMP_BRANCH" + # gh pr create --base $base_branch --head $VERSION_BUMP_BRANCH --title "[Nightly Version Bump] [GitHub Action] Update package versions" --body "Bump versions" From fa54b898b07f0c710dd74d3b4c57f5c2e62c929a Mon Sep 17 00:00:00 2001 From: Brion Date: Sun, 21 Jan 2024 14:48:44 +0530 Subject: [PATCH 3/3] Remove redundant workflow --- .../asgardeo-auth-spa-version-updater.yml | 76 ------------------- 1 file changed, 76 deletions(-) delete mode 100644 .github/workflows/asgardeo-auth-spa-version-updater.yml diff --git a/.github/workflows/asgardeo-auth-spa-version-updater.yml b/.github/workflows/asgardeo-auth-spa-version-updater.yml deleted file mode 100644 index 9a8a18ea71c..00000000000 --- a/.github/workflows/asgardeo-auth-spa-version-updater.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: 🌝 Nightly Version Bump - -on: - pull_request: - branches: [ master ] - workflow_dispatch: - -env: - GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }} - BOT_USERNAME: ${{ secrets.RELEASE_BOT_USER_NAME }} - BOT_EMAIL: ${{ secrets.RELEASE_BOT_EMAIL }} - BASE_BRANCH: 'main' - -jobs: - bump-version: - name: 🌝 Nightly Version Bump - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [lts/*] - maven-version: [3.8.6] - java-version: [1.8] - pnpm-version: [8.7.4] - steps: - - name: ⬇️ Checkout - id: checkout - uses: actions/checkout@v2.3.3 - with: - fetch-depth: 0 - - - name: 🌟 Set up Git - run: | - git config user.name ${{ env.BOT_USERNAME }}} - git config user.email ${{ env.BOT_EMAIL }}} - - - name: 🏷️ Set branch name - id: set-branch-name - run: | - base_branch=${{ env.BASE_BRANCH }} - version_bump_branch="asgardeo-auth-spa-version-bump/$base_branch" - echo "Setting branch name to: $version_bump_branch" - echo "VERSION_BUMP_BRANCH=${version_bump_branch}" >> $GITHUB_ENV - - - name: 🚀 Create version bump branch - id: create-branch - run: | - echo "Checking out a new branch: $VERSION_BUMP_BRANCH" - git checkout -b "$VERSION_BUMP_BRANCH" - - - name: Validate existing `@asgardeo/auth-spa` version - id: validate-existing-auth-spa-version - run: | - existing_version=$(grep -oP 'auth-spa-\K[0-9]+\.[0-9]+\.[0-9]+' apps/console/src/public/auth-spa-3.0.1.min.js) - echo "EXISTING_ASGARDEO_AUTH_VERSION=${existing_version}" >> $GITHUB_ENV - - name: Check if existing and latest versions match - id: check-version-match - run: | - existing_version=$(grep -oP 'auth-spa-\K[0-9]+\.[0-9]+\.[0-9]+' apps/console/src/public/auth-spa-3.0.1.min.js) - latest_release=$(curl -s https://api.github.com/repos/asgardeo/asgardeo-auth-spa-sdk/releases/latest | jq -r '.tag_name') - - # if [ "$existing_version" == "$latest_release" ]; then - # echo "Versions match. Aborting further steps." - # exit 0 - # fi - - echo "EXISTING_ASGARDEO_AUTH_VERSION=${existing_version}" >> $GITHUB_ENV - echo "LATEST_ASGARDEO_AUTH_VERSION=${latest_release}" >> $GITHUB_ENV - - echo "Existing version: $existing_version" - echo "Latest release: $latest_release" - # - name: 🎉 Create pull request - # id: create-pr - # run: | - # echo "VERSION_BUMP_BRANCH: $VERSION_BUMP_BRANCH" - # echo "Creating pull request from $base_branch to $VERSION_BUMP_BRANCH" - # gh pr create --base $base_branch --head $VERSION_BUMP_BRANCH --title "[Nightly Version Bump] [GitHub Action] Update package versions" --body "Bump versions"