The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Only offer user-assignable roles in the workspace default role picker (#28644)
Paul Rastoind975a8eaca4a
diff --git a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesDefaultRole.tsx b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesDefaultRole.tsxindex 86aecce1982..334e74cbb34 100644--- a/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesDefaultRole.tsx+++ b/packages/twenty-front/src/modules/settings/roles/components/SettingsRolesDefaultRole.tsx@@ -59,11 +59,13 @@ export const SettingsRoleDefaultRole = ({return null;}- const options = roles.map((role) => ({- label: role.label,- value: role.id,- Icon: getIcon(role.icon) ?? IconUserPin,- }));+ const options = roles+ .filter((role) => role.canBeAssignedToUsers)+ .map((role) => ({+ label: role.label,+ value: role.id,+ Icon: getIcon(role.icon) ?? IconUserPin,+ }));if (options.length === 0) {return null;