diff --git a/packages/builder/src/components/common/RoleSelect.svelte b/packages/builder/src/components/common/RoleSelect.svelte
index 82752554d5..2df61926e1 100644
--- a/packages/builder/src/components/common/RoleSelect.svelte
+++ b/packages/builder/src/components/common/RoleSelect.svelte
@@ -39,7 +39,15 @@
allowCreator
) => {
if (allowedRoles?.length) {
- return roles.filter(role => allowedRoles.includes(role._id))
+ const filteredRoles = roles.filter(role =>
+ allowedRoles.includes(role._id)
+ )
+ return [
+ ...filteredRoles,
+ ...(allowedRoles.includes(Constants.Roles.CREATOR)
+ ? [{ _id: Constants.Roles.CREATOR, name: "Creator", enabled: false }]
+ : []),
+ ]
}
let newRoles = [...roles]
@@ -129,8 +137,9 @@
getOptionColour={getColor}
getOptionIcon={getIcon}
isOptionEnabled={option =>
- option._id !== Constants.Roles.CREATOR ||
- $licensing.perAppBuildersEnabled}
+ (option._id !== Constants.Roles.CREATOR ||
+ $licensing.perAppBuildersEnabled) &&
+ option.enabled !== false}
{placeholder}
{error}
/>
diff --git a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte
index a7d9584330..f9a40b09a6 100644
--- a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte
@@ -516,6 +516,13 @@
}
return null
}
+
+ const parseRole = user => {
+ if (user.isAdminOrGlobalBuilder) {
+ return Constants.Roles.CREATOR
+ }
+ return user.role
+ }
@@ -725,7 +732,7 @@