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] Move SettingsPermissions from twenty-shared to twenty-server #10430

Merged
merged 3 commits into from
Feb 24, 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 relocates the SettingsPermissions enum from twenty-shared to twenty-server package, improving architectural boundaries by keeping server-specific permissions within the server codebase.

  • Moved SettingsPermissions enum to /packages/twenty-server/src/engine/metadata-modules/permissions/constants/settings-permissions.constants.ts
  • Updated import paths across 14 resolver and module files to use new local path
  • Removed SettingsPermissions export from /packages/twenty-shared/src/constants/index.ts
  • Maintains all existing permission values and functionality while consolidating server-side concerns

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

@@ -7,7 +7,7 @@ import {
} from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';

import { SettingsPermissions } from 'twenty-shared';
import { SettingsPermissions } from "src/engine/metadata-modules/permissions/constants/settings-permissions.constants";
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Double quotes used for import statement while single quotes are used elsewhere. Maintain consistent quote style.

Copy link
Member

Choose a reason for hiding this comment

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

👍

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.

@ijreilly I think we still have some imports in the frontend 🙂
You can use the generated type from graphql there

@ijreilly ijreilly force-pushed the perm--move-settings-permissions branch from b13a561 to c37792c Compare February 24, 2025 11:01
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

@@ -7,7 +7,7 @@ import {
} from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';

import { SettingsPermissions } from 'twenty-shared';
import { SettingsPermissions } from "src/engine/metadata-modules/permissions/constants/settings-permissions.constants";
Copy link
Member

Choose a reason for hiding this comment

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

👍

@ijreilly ijreilly enabled auto-merge (squash) February 24, 2025 11:10
@ijreilly ijreilly merged commit 730792c into main Feb 24, 2025
49 checks passed
@ijreilly ijreilly deleted the perm--move-settings-permissions branch February 24, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants