Merge branch 'master' into remove-apidoc-comments
This commit is contained in:
commit
a669712d0c
|
@ -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}
|
||||
/>
|
||||
|
|
|
@ -516,6 +516,13 @@
|
|||
}
|
||||
return null
|
||||
}
|
||||
|
||||
const parseRole = user => {
|
||||
if (user.isAdminOrGlobalBuilder) {
|
||||
return Constants.Roles.CREATOR
|
||||
}
|
||||
return user.role
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={handleKeyDown} />
|
||||
|
@ -725,7 +732,7 @@
|
|||
<RoleSelect
|
||||
footer={getRoleFooter(user)}
|
||||
placeholder={false}
|
||||
value={user.role}
|
||||
value={parseRole(user)}
|
||||
allowRemove={user.role && !user.group}
|
||||
allowPublic={false}
|
||||
allowCreator={true}
|
||||
|
@ -744,7 +751,7 @@
|
|||
autoWidth
|
||||
align="right"
|
||||
allowedRoles={user.isAdminOrGlobalBuilder
|
||||
? [Constants.Roles.ADMIN]
|
||||
? [Constants.Roles.CREATOR]
|
||||
: null}
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue