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)",
|
||||
description: "Custom role",
|
||||
},
|
||||
permissionId: "write",
|
||||
inherits: [Roles.BASIC],
|
||||
})
|
||||
await tick()
|
||||
layoutAndFit()
|
||||
|
|
|
@ -201,7 +201,10 @@ export const roleToNode = role => {
|
|||
// Converts a node structure back into a role doc
|
||||
export const nodeToRole = ({ node, edges }) => ({
|
||||
...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: {
|
||||
displayName: node.data.displayName,
|
||||
color: node.data.color,
|
||||
|
|
Loading…
Reference in New Issue