Remove permissionId when creating roles and ensure all roles inherit basic
This commit is contained in:
parent
69969e8cc5
commit
86620b9a26
|
@ -95,7 +95,7 @@
|
||||||
color: "var(--spectrum-global-color-gray-700)",
|
color: "var(--spectrum-global-color-gray-700)",
|
||||||
description: "Custom role",
|
description: "Custom role",
|
||||||
},
|
},
|
||||||
permissionId: "write",
|
inherits: [Roles.BASIC],
|
||||||
})
|
})
|
||||||
await tick()
|
await tick()
|
||||||
layoutAndFit()
|
layoutAndFit()
|
||||||
|
|
|
@ -201,7 +201,10 @@ export const roleToNode = role => {
|
||||||
// Converts a node structure back into a role doc
|
// Converts a node structure back into a role doc
|
||||||
export const nodeToRole = ({ node, edges }) => ({
|
export const nodeToRole = ({ node, edges }) => ({
|
||||||
...get(roles).find(role => role._id === node.id),
|
...get(roles).find(role => role._id === node.id),
|
||||||
inherits: edges.filter(x => x.target === node.id).map(x => x.source),
|
inherits: edges
|
||||||
|
.filter(x => x.target === node.id)
|
||||||
|
.map(x => x.source)
|
||||||
|
.concat(Roles.BASIC),
|
||||||
uiMetadata: {
|
uiMetadata: {
|
||||||
displayName: node.data.displayName,
|
displayName: node.data.displayName,
|
||||||
color: node.data.color,
|
color: node.data.color,
|
||||||
|
|
Loading…
Reference in New Issue