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] Rename enum SettingsFeatures --> SettingsPermissions #10389

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

ijreilly
Copy link
Collaborator

No description provided.

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 renames the SettingsFeatures enum to SettingsPermissions across the entire codebase to better reflect its purpose in managing permissions rather than features.

Key changes:

  • Renamed enum in packages/twenty-shared/src/constants/SettingsPermissions.ts while preserving all enum values
  • Updated import statements and type annotations in both frontend and backend files
  • Modified GraphQL schema definitions to use the new enum name in generated types
  • Updated test files to maintain consistency with the renamed enum
  • Adjusted guard decorators across resolvers to use the renamed enum for permission checks

The changes improve naming clarity and semantic accuracy without modifying any underlying functionality or permission values.

31 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 122 to 124
const permittedFeatures: SettingsPermissions[] = (
Object.keys(settingsPermissions) as SettingsPermissions[]
).filter((feature) => settingsPermissions[feature] === true);
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Variable name 'permittedFeatures' should be renamed to 'permittedPermissions' to match the new enum name

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will update that in my next pr

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.

Much better thank you @ijreilly !

@ijreilly ijreilly enabled auto-merge (squash) February 21, 2025 15:57
@ijreilly ijreilly merged commit 50bd912 into main Feb 21, 2025
49 checks passed
@ijreilly ijreilly deleted the perm--rename-enum branch February 21, 2025 16:04
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