fix: updated naming convention in action & object label (#12935)

Fixed the naming convention at object-level permissions. Removed the
_Records on_.
Only [Action] + [Object Name] (e.g. "See Companies") will be shown


![image](https://github.com/user-attachments/assets/8ffb83b0-24fb-4c48-bb0f-3df367d5c193)

Closes #12906

Co-authored-by: Jagss24 <btwitsjagannat12@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Jagannath Samantra
2025-07-03 03:23:22 +05:30
committed by GitHub
parent 5e18438f4c
commit fb9b61c8c4

View File

@ -85,7 +85,7 @@ export const SettingsRolePermissionsObjectLevelObjectFormObjectLevel = ({
[
{
key: 'canReadObjectRecords',
label: t`See Records on ${objectLabel}`,
label: t`See ${objectLabel}`,
value: settingsDraftRoleObjectPermissions.canReadObjectRecords,
setValue: (value: boolean | null) => {
updateObjectPermission('canReadObjectRecords', value);
@ -93,7 +93,7 @@ export const SettingsRolePermissionsObjectLevelObjectFormObjectLevel = ({
},
{
key: 'canUpdateObjectRecords',
label: t`Edit Records on ${objectLabel}`,
label: t`Edit ${objectLabel}`,
value: settingsDraftRoleObjectPermissions.canUpdateObjectRecords,
setValue: (value: boolean | null) => {
updateObjectPermission('canUpdateObjectRecords', value);
@ -101,7 +101,7 @@ export const SettingsRolePermissionsObjectLevelObjectFormObjectLevel = ({
},
{
key: 'canSoftDeleteObjectRecords',
label: t`Delete Records on ${objectLabel}`,
label: t`Delete ${objectLabel}`,
value: settingsDraftRoleObjectPermissions.canSoftDeleteObjectRecords,
setValue: (value: boolean | null) => {
updateObjectPermission('canSoftDeleteObjectRecords', value);
@ -109,7 +109,7 @@ export const SettingsRolePermissionsObjectLevelObjectFormObjectLevel = ({
},
{
key: 'canDestroyObjectRecords',
label: t`Destroy Records on ${objectLabel}`,
label: t`Destroy ${objectLabel}`,
value: settingsDraftRoleObjectPermissions.canDestroyObjectRecords,
setValue: (value: boolean | null) => {
updateObjectPermission('canDestroyObjectRecords', value);