Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[permissions] Fix db reset leads to broken state if env var permission is not true #10309

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

ijreilly
Copy link
Collaborator

No description provided.

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM

@ijreilly ijreilly enabled auto-merge (squash) February 18, 2025 17:19
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR modifies the permissions feature flag handling to prevent broken states during database resets by moving control from database seeding to environment variable-based configuration.

  • Removed IsPermissionsEnabled from default seeded feature flags in /packages/twenty-server/src/database/typeorm-seeds/core/feature-flags.ts
  • Added conditional feature flag enablement in initPermissionsDev method in /packages/twenty-server/src/engine/workspace-manager/workspace-manager.service.ts
  • Ensures permissions are only enabled when explicitly configured via environment variables

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@ijreilly ijreilly merged commit 222f475 into main Feb 18, 2025
32 checks passed
@ijreilly ijreilly deleted the perm-enable-ff-conditionnally branch February 18, 2025 17:25
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