[permissions V2] Upsert object and setting permissions (#11119)
Closes https://github.com/twentyhq/core-team-issues/issues/639
This commit is contained in:
@ -21,7 +21,7 @@ import {
|
||||
Section,
|
||||
} from 'twenty-ui';
|
||||
import { Role } from '~/generated-metadata/graphql';
|
||||
import { SettingsPermissions } from '~/generated/graphql';
|
||||
import { SettingPermissionType } from '~/generated/graphql';
|
||||
import { RolePermissionsObjectsTableRow } from './RolePermissionsObjectsTableRow';
|
||||
|
||||
const StyledRolePermissionsContainer = styled.div`
|
||||
@ -81,49 +81,49 @@ export const RolePermissions = ({ role }: RolePermissionsProps) => {
|
||||
|
||||
const settingsPermissionsConfig: RolePermissionsSettingPermission[] = [
|
||||
{
|
||||
key: SettingsPermissions.API_KEYS_AND_WEBHOOKS,
|
||||
key: SettingPermissionType.API_KEYS_AND_WEBHOOKS,
|
||||
name: 'API Keys & Webhooks',
|
||||
description: 'Manage API keys and webhooks',
|
||||
value: role.canUpdateAllSettings,
|
||||
Icon: IconCode,
|
||||
},
|
||||
{
|
||||
key: SettingsPermissions.WORKSPACE,
|
||||
key: SettingPermissionType.WORKSPACE,
|
||||
name: 'Workspace',
|
||||
description: 'Set global workspace preferences',
|
||||
value: role.canUpdateAllSettings,
|
||||
Icon: IconSettings,
|
||||
},
|
||||
{
|
||||
key: SettingsPermissions.WORKSPACE_MEMBERS,
|
||||
key: SettingPermissionType.WORKSPACE_MEMBERS,
|
||||
name: 'Users',
|
||||
description: 'Add or remove users',
|
||||
value: role.canUpdateAllSettings,
|
||||
Icon: IconUsers,
|
||||
},
|
||||
{
|
||||
key: SettingsPermissions.ROLES,
|
||||
key: SettingPermissionType.ROLES,
|
||||
name: 'Roles',
|
||||
description: 'Define user roles and access levels',
|
||||
value: role.canUpdateAllSettings,
|
||||
Icon: IconLockOpen,
|
||||
},
|
||||
{
|
||||
key: SettingsPermissions.DATA_MODEL,
|
||||
key: SettingPermissionType.DATA_MODEL,
|
||||
name: 'Data Model',
|
||||
description: 'Edit CRM data structure and fields',
|
||||
value: role.canUpdateAllSettings,
|
||||
Icon: IconHierarchy,
|
||||
},
|
||||
{
|
||||
key: SettingsPermissions.ADMIN_PANEL,
|
||||
key: SettingPermissionType.ADMIN_PANEL,
|
||||
name: 'Admin Panel',
|
||||
description: 'Admin settings and system tools',
|
||||
value: role.canUpdateAllSettings,
|
||||
Icon: IconServer,
|
||||
},
|
||||
{
|
||||
key: SettingsPermissions.SECURITY,
|
||||
key: SettingPermissionType.SECURITY,
|
||||
name: 'Security',
|
||||
description: 'Manage security policies',
|
||||
value: role.canUpdateAllSettings,
|
||||
|
||||
Reference in New Issue
Block a user