Skip to content

Conversation

tjementum
Copy link
Member

@tjementum tjementum commented Aug 6, 2025

Summary & Motivation

Add support for uploading account logos and show the account names in the side menu and invitation emails. While the account name could previously be changed, it was not used anywhere. It is now displayed in the side menu with the logo to clearly indicate which account the user is currently logged into.

  • Implement backend storage for account logos using Azure Blob Storage using shared access signatures
  • Create frontend UI components for uploading, displaying, and removing account logos in the account settings
  • Display logo and account name in the side menu
  • Add logic to prevent user invitations when an account lacks a name
  • Rename blob storage environment variable in AppGateway Bicep infrastructure from AVATARS_STORAGE_URL to ACCOUNT_MANAGEMENT_STORAGE_URL for unified storage connection. This allows using the same connection string for both logos and avatars stored in the Account Management Blob Storage account.

Downstream projects

Important: Infrastructure changes require careful deployment to avoid downtime

The environment variable AVATARS_STORAGE_URL has been renamed to ACCOUNT_MANAGEMENT_STORAGE_URL in the AppGateway infrastructure.

Deployment steps to avoid downtime:

  1. Manually add the ACCOUNT_MANAGEMENT_STORAGE_URL environment variable to AppGateway with the same value as the existing AVATARS_STORAGE_URL
  2. Deploy the new AppGateway: .github/workflows/app-gateway.yml
  3. Deploy Account Management: .github/workflows/account-management.yml
  4. After verifying the services are running correctly, deploy the infrastructure which will remove the old AVATARS_STORAGE_URL environment variable using this: .github/workflows/cloud-infrastructure.yml

Note: This deployment sequence has not been tested. Please verify in your staging environment first.

Reminder: Deploying infrastructure in parallel with self-contained systems may revert the active Docker version to the previous one. This occurs because infrastructure deployment begins by retrieving the active version and adding it to the Bicep deployment. If a new version is deployed during this process, Bicep might revert it.

Checklist

  • I have added tests, or done manual regression tests
  • I have updated the documentation, if necessary

@tjementum tjementum self-assigned this Aug 6, 2025
@tjementum tjementum added the Enhancement New feature or request label Aug 6, 2025
@tjementum tjementum requested a review from a team as a code owner August 6, 2025 22:51
@tjementum tjementum added the Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment label Aug 6, 2025
@tjementum tjementum moved this to 🏗 In Progress in Kanban board Aug 6, 2025
Copy link

github-actions bot commented Aug 6, 2025

Approve Database Migration account-management database on stage

The following pending migration(s) will be applied to the database when approved:

  • AddTenantLogo (20250804001944_AddTenantLogo)

Migration Script

BEGIN TRANSACTION;
IF NOT EXISTS (
    SELECT * FROM [__EFMigrationsHistory]
    WHERE [MigrationId] = N'20250804001944_AddTenantLogo'
)
BEGIN
    ALTER TABLE [Tenants] ADD [Logo] varchar(150) NOT NULL DEFAULT '{}';
END;

IF NOT EXISTS (
    SELECT * FROM [__EFMigrationsHistory]
    WHERE [MigrationId] = N'20250804001944_AddTenantLogo'
)
BEGIN
    INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
    VALUES (N'20250804001944_AddTenantLogo', N'9.0.4');
END;

COMMIT;
GO

Copy link

github-actions bot commented Aug 6, 2025

Approve Database Migration account-management database on stage

The following pending migration(s) will be applied to the database when approved:

  • AddTenantLogo (20250804001944_AddTenantLogo)

Migration Script

BEGIN TRANSACTION;
IF NOT EXISTS (
    SELECT * FROM [__EFMigrationsHistory]
    WHERE [MigrationId] = N'20250804001944_AddTenantLogo'
)
BEGIN
    ALTER TABLE [Tenants] ADD [Logo] varchar(150) NOT NULL DEFAULT '{}';
END;

IF NOT EXISTS (
    SELECT * FROM [__EFMigrationsHistory]
    WHERE [MigrationId] = N'20250804001944_AddTenantLogo'
)
BEGIN
    INSERT INTO [__EFMigrationsHistory] ([MigrationId], [ProductVersion])
    VALUES (N'20250804001944_AddTenantLogo', N'9.0.4');
END;

COMMIT;
GO

@tjementum tjementum changed the title Add account logo functionality and display account name in navigation Add upload logo functionality and display account name and logo in navigation Aug 6, 2025
Copy link

sonarqubecloud bot commented Aug 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@tjementum tjementum removed the Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment label Aug 7, 2025
@tjementum tjementum merged commit 01b6320 into main Aug 7, 2025
35 of 39 checks passed
@tjementum tjementum deleted the tenant-logo branch August 7, 2025 00:12
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in Kanban board Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant