## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /test all ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13391658708> > Commit: d30db4487d93622533aec846a17fecea12e0205e > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13391658708&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/ActionExecution/FrameworkFunctions_LocalStoreValueFunctions_spec.ts > <li>cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts > <li>cypress/e2e/Regression/ClientSide/Widgets/TableV2/table_data_change_spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Tue, 18 Feb 2025 14:35:32 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced organization-level configuration management, impacting admin settings, login, and branding displays. - Enhanced handling of permissions and feature flags now centered on organizations. - **Refactor** - Updated user-facing terminology across the application from “tenant” to “organization” (e.g., in dashboards, profile settings, error pages, and admin panels). - Refactored multiple components and services to utilize organization-based logic instead of tenant-based logic. - **Chore** - Deployed comprehensive migration scripts to seamlessly transition all settings and cached data to the new organization model. These updates improve consistency and clarity in how configurations and permissions are managed and presented. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
72 lines
2.8 KiB
Bash
Executable File
72 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Navigate to the client src directory
|
|
cd app/client/src || { echo "Failed to navigate to app/client/src directory"; exit 1; }
|
|
|
|
# First, find and rename files containing 'tenant' or 'tentant' in their names
|
|
find . -type f \
|
|
\( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
|
|
! -path "*/cypress/fixtures/*" \
|
|
! -path "*/assets/*" \
|
|
! -name "*.pdf" \
|
|
! -name "*.png" \
|
|
! -name "*.jpg" \
|
|
! -name "*.jpeg" \
|
|
! -name "*.gif" \
|
|
! -name "*.mp4" \
|
|
! -name "*.webm" \
|
|
! -name "*.svg" | while read -r file; do
|
|
|
|
# Check if filename contains 'tenant' or 'tentant' (case-insensitive)
|
|
filename=$(basename "$file")
|
|
dirname=$(dirname "$file")
|
|
|
|
# Create new filename replacing both spellings
|
|
newfilename=$(echo "$filename" | sed -e 's/tentant/organization/g' -e 's/Tentant/Organization/g' -e 's/tenant/organization/g' -e 's/Tenant/Organization/g')
|
|
|
|
# If filename changed, rename the file
|
|
if [ "$filename" != "$newfilename" ]; then
|
|
mv "$file" "$dirname/$newfilename"
|
|
echo "Renamed: $file → $dirname/$newfilename"
|
|
# Update file variable to point to new location
|
|
file="$dirname/$newfilename"
|
|
fi
|
|
|
|
# Create backup
|
|
cp "$file" "$file.bak"
|
|
|
|
# Perform content replacements
|
|
sed -i.tmp \
|
|
-e 's/tentantConfiguration/organizationConfiguration/g' \
|
|
-e 's/TentantConfiguration/OrganizationConfiguration/g' \
|
|
-e 's/TENTANT_CONFIGURATION/ORGANIZATION_CONFIGURATION/g' \
|
|
-e 's/tenantConfiguration/organizationConfiguration/g' \
|
|
-e 's/TenantConfiguration/OrganizationConfiguration/g' \
|
|
-e 's/TENANT_CONFIGURATION/ORGANIZATION_CONFIGURATION/g' \
|
|
-e 's/\([^a-zA-Z0-9]\)tentant\([^a-zA-Z0-9]\)/\1organization\2/g' \
|
|
-e 's/\([^a-zA-Z0-9]\)Tentant\([^a-zA-Z0-9]\)/\1Organization\2/g' \
|
|
-e 's/\([^a-zA-Z0-9]\)TENTANT\([^a-zA-Z0-9]\)/\1ORGANIZATION\2/g' \
|
|
-e 's/\([^a-zA-Z0-9]\)tenant\([^a-zA-Z0-9]\)/\1organization\2/g' \
|
|
-e 's/\([^a-zA-Z0-9]\)Tenant\([^a-zA-Z0-9]\)/\1Organization\2/g' \
|
|
-e 's/\([^a-zA-Z0-9]\)TENANT\([^a-zA-Z0-9]\)/\1ORGANIZATION\2/g' \
|
|
-e 's/Tentant\([A-Z]\)/Organization\1/g' \
|
|
-e 's/tentant\([A-Z]\)/organization\1/g' \
|
|
-e 's/Tenant\([A-Z]\)/Organization\1/g' \
|
|
-e 's/tenant\([A-Z]\)/organization\1/g' \
|
|
-e 's/\([a-z]\)Tentant/\1Organization/g' \
|
|
-e 's/\([a-z]\)tentant/\1organization/g' \
|
|
-e 's/\([a-z]\)Tenant/\1Organization/g' \
|
|
-e 's/\([a-z]\)tenant/\1organization/g' \
|
|
"$file"
|
|
|
|
# Compare files to see if content was modified
|
|
if ! cmp -s "$file" "$file.bak"; then
|
|
echo "Updated content: $file"
|
|
fi
|
|
|
|
# Clean up temporary files
|
|
rm "$file.bak"
|
|
rm "$file.tmp"
|
|
done
|
|
|
|
echo "Replacement complete!" |