Skip to content

fix ceadr policies#1664

Merged
Artuomka merged 1 commit intomainfrom
backend_ceadr_permissions_fixing
Mar 13, 2026
Merged

fix ceadr policies#1664
Artuomka merged 1 commit intomainfrom
backend_ceadr_permissions_fixing

Conversation

@Artuomka
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings March 13, 2026 10:22
@Artuomka Artuomka enabled auto-merge March 13, 2026 10:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Cedar authorization policies by updating the migration script to also re-migrate groups with old-format policies (using principal in RocketAdmin::Group instead of bare principal), and adds Cedar policy generation to the DemoDataService so demo connections get proper Cedar policies on creation.

Changes:

  • Updated migratePermissionsToCedar to detect and re-migrate old-format Cedar policies using a LIKE clause
  • Added Cedar policy generation step in DemoDataService.createDemoData() after creating groups/permissions, with care to avoid TypeORM wiping the join table
  • Added comprehensive e2e tests for both SaaS and non-SaaS Cedar migration scenarios

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backend/src/entities/cedar-authorization/scripts/migrate-permissions-to-cedar.ts Broadened migration query to also re-migrate old-format Cedar policies
backend/src/entities/demo-data/demo-data.service.ts Added Cedar policy generation for demo data groups
backend/src/helpers/constants/constants.ts Whitespace-only change
backend/test/ava-tests/saas-tests/saas-cedar-migration-existing-users-e2e.test.ts New e2e tests for SaaS Cedar migration
backend/test/ava-tests/non-saas-tests/non-saas-cedar-migration-existing-users-e2e.test.ts New e2e tests for non-SaaS Cedar migration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Artuomka Artuomka merged commit b8764be into main Mar 13, 2026
21 of 23 checks passed
@Artuomka Artuomka deleted the backend_ceadr_permissions_fixing branch March 13, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants