Closed FreePhoenix888 closed 11 months ago
Closed cause of https://github.com/deep-foundation/deeplinks/issues/284
Error
![image](https://github.com/deep-foundation/deeplinks/assets/66206278/ab8fd982-9b7e-4d42-bb18-12d06078202f)How to reproduce
- Create the same links I have in "My Links" header - Login as the user which is considered as the rule subject - Insert TypeMy Links
→My Links Visually (Screenshots from Deepcase)
![image](https://github.com/deep-foundation/deeplinks/assets/66206278/d947a063-0ea4-41af-885a-6b22833e8e35) ![image](https://github.com/deep-foundation/deeplinks/assets/66206278/a66f3d0d-7bc4-446a-8176-4ca6a9b93395)→My Links as JSON
I have used this code to get json below: ```typescript await deep.select({ up: { tree_id: await deep.id("@deep-foundation/core", "containTree"), parent_id: 1189 } }) ``` Result: ```json { "data": [ { "id": 1424, "type_id": 20, "from_id": 1380, "to_id": 1390, "value": null, "__typename": "links" }, { "id": 1425, "type_id": 3, "from_id": 1189, "to_id": 1424, "value": { "id": 438, "value": "myRuleAction", "link_id": 1425 }, "__typename": "links" }, { "id": 1496, "type_id": 55, "from_id": 1189, "to_id": 1495, "value": { "id": 66, "value": { "x": 430.9999999999999, "y": 98 }, "link_id": 1496 }, "__typename": "links" }, { "id": 1497, "type_id": 3, "from_id": 1189, "to_id": 1496, "value": null, "__typename": "links" }, { "id": 1506, "type_id": 55, "from_id": 1189, "to_id": 1505, "value": { "id": 68, "value": { "x": 192.9999999999999, "y": 184 }, "link_id": 1506 }, "__typename": "links" }, { "id": 1507, "type_id": 3, "from_id": 1189, "to_id": 1506, "value": null, "__typename": "links" }, { "id": 1210, "type_id": 55, "from_id": 1189, "to_id": 1209, "value": { "id": 42, "value": { "x": 295, "y": 85 }, "link_id": 1210 }, "__typename": "links" }, { "id": 1211, "type_id": 3, "from_id": 1189, "to_id": 1210, "value": null, "__typename": "links" }, { "id": 1217, "type_id": 22, "from_id": 0, "to_id": 0, "value": null, "__typename": "links" }, { "id": 1218, "type_id": 55, "from_id": 1189, "to_id": 1217, "value": { "id": 43, "value": { "x": -206.0000000000001, "y": -462 }, "link_id": 1218 }, "__typename": "links" }, { "id": 1219, "type_id": 3, "from_id": 1189, "to_id": 1218, "value": null, "__typename": "links" }, { "id": 1220, "type_id": 3, "from_id": 1189, "to_id": 1217, "value": { "id": 431, "value": "myUser", "link_id": 1220 }, "__typename": "links" }, { "id": 1427, "type_id": 55, "from_id": 1189, "to_id": 1426, "value": { "id": 53, "value": { "x": -258, "y": 314 }, "link_id": 1427 }, "__typename": "links" }, { "id": 1428, "type_id": 3, "from_id": 1189, "to_id": 1427, "value": null, "__typename": "links" }, { "id": 1438, "type_id": 55, "from_id": 1189, "to_id": 1437, "value": { "id": 55, "value": { "x": -54, "y": 211 }, "link_id": 1438 }, "__typename": "links" }, { "id": 1439, "type_id": 3, "from_id": 1189, "to_id": 1438, "value": null, "__typename": "links" }, { "id": 1447, "type_id": 55, "from_id": 1189, "to_id": 1446, "value": { "id": 56, "value": { "x": -648, "y": -71 }, "link_id": 1447 }, "__typename": "links" }, { "id": 1448, "type_id": 3, "from_id": 1189, "to_id": 1447, "value": null, "__typename": "links" }, { "id": 1476, "type_id": 55, "from_id": 1189, "to_id": 1189, "value": { "id": 62, "value": { "x": 42, "y": 73 }, "link_id": 1476 }, "__typename": "links" }, { "id": 1477, "type_id": 3, "from_id": 1189, "to_id": 1476, "value": null, "__typename": "links" }, { "id": 1512, "type_id": 58, "from_id": 0, "to_id": 0, "value": { "id": 69, "value": { "id": 1 }, "link_id": 1512 }, "__typename": "links" }, { "id": 1513, "type_id": 3, "from_id": 1189, "to_id": 1512, "value": null, "__typename": "links" }, { "id": 1514, "type_id": 92, "from_id": 1189, "to_id": 1512, "value": null, "__typename": "links" }, { "id": 1515, "type_id": 3, "from_id": 1189, "to_id": 1514, "value": null, "__typename": "links" }, { "id": 1516, "type_id": 799, "from_id": 1, "to_id": 1512, "value": null, "__typename": "links" }, { "id": 1517, "type_id": 3, "from_id": 1189, "to_id": 1516, "value": null, "__typename": "links" }, { "id": 1518, "type_id": 55, "from_id": 1189, "to_id": 1, "value": { "id": 70, "value": { "x": 422.9999999999999, "y": -32 }, "link_id": 1518 }, "__typename": "links" }, { "id": 1519, "type_id": 3, "from_id": 1189, "to_id": 1518, "value": null, "__typename": "links" }, { "id": 1546, "type_id": 16, "from_id": 1536, "to_id": 1217, "value": null, "__typename": "links" }, { "id": 1547, "type_id": 3, "from_id": 1189, "to_id": 1546, "value": { "id": 448, "value": "myRuleSubjectSelectorInclude", "link_id": 1547 }, "__typename": "links" }, { "id": 1548, "type_id": 55, "from_id": 1189, "to_id": 1547, "value": { "id": 75, "value": { "x": -33.000000000000114, "y": -229 }, "link_id": 1548 }, "__typename": "links" }, { "id": 1549, "type_id": 3, "from_id": 1189, "to_id": 1548, "value": null, "__typename": "links" }, { "id": 1221, "type_id": 55, "from_id": 1189, "to_id": 1220, "value": { "id": 44, "value": { "x": 233, "y": 80 }, "link_id": 1221 }, "__typename": "links" }, { "id": 1222, "type_id": 3, "from_id": 1189, "to_id": 1221, "value": null, "__typename": "links" }, { "id": 1380, "type_id": 17, "from_id": 0, "to_id": 0, "value": null, "__typename": "links" }, { "id": 1381, "type_id": 55, "from_id": 1189, "to_id": 1380, "value": { "id": 46, "value": { "x": -95, "y": -49 }, "link_id": 1381 }, "__typename": "links" }, { "id": 1382, "type_id": 3, "from_id": 1189, "to_id": 1381, "value": null, "__typename": "links" }, { "id": 1383, "type_id": 3, "from_id": 1189, "to_id": 1380, "value": { "id": 432, "value": "myRule", "link_id": 1383 }, "__typename": "links" }, { "id": 1390, "type_id": 15, "from_id": 0, "to_id": 0, "value": null, "__typename": "links" }, { "id": 1391, "type_id": 55, "from_id": 1189, "to_id": 1390, "value": { "id": 48, "value": { "x": -65, "y": -213 }, "link_id": 1391 }, "__typename": "links" }, { "id": 1392, "type_id": 3, "from_id": 1189, "to_id": 1391, "value": null, "__typename": "links" }, { "id": 1393, "type_id": 3, "from_id": 1189, "to_id": 1390, "value": { "id": 433, "value": "myRuleActionSelector", "link_id": 1393 }, "__typename": "links" }, { "id": 1394, "type_id": 55, "from_id": 1189, "to_id": 1393, "value": { "id": 49, "value": { "x": 73, "y": -93 }, "link_id": 1394 }, "__typename": "links" }, { "id": 1395, "type_id": 3, "from_id": 1189, "to_id": 1394, "value": null, "__typename": "links" }, { "id": 1430, "type_id": 55, "from_id": 1189, "to_id": 1429, "value": { "id": 54, "value": { "x": -282, "y": 180 }, "link_id": 1430 }, "__typename": "links" }, { "id": 1431, "type_id": 3, "from_id": 1189, "to_id": 1430, "value": null, "__typename": "links" }, { "id": 1450, "type_id": 55, "from_id": 1189, "to_id": 1449, "value": { "id": 57, "value": { "x": -422, "y": -62 }, "link_id": 1450 }, "__typename": "links" }, { "id": 1451, "type_id": 3, "from_id": 1189, "to_id": 1450, "value": null, "__typename": "links" }, { "id": 1478, "type_id": 55, "from_id": 1189, "to_id": 1475, "value": { "id": 63, "value": { "x": 73, "y": -205 }, "link_id": 1478 }, "__typename": "links" }, { "id": 1479, "type_id": 3, "from_id": 1189, "to_id": 1478, "value": null, "__typename": "links" }, { "id": 1520, "type_id": 16, "from_id": 1502, "to_id": 1, "value": null, "__typename": "links" }, { "id": 1521, "type_id": 3, "from_id": 1189, "to_id": 1520, "value": { "id": 444, "value": "myRuleObjectSelectorInclude", "link_id": 1521 }, "__typename": "links" }, { "id": 1522, "type_id": 55, "from_id": 1189, "to_id": 1521, "value": { "id": 71, "value": { "x": 167.9999999999999, "y": -20 }, "link_id": 1522 }, "__typename": "links" }, { "id": 1523, "type_id": 3, "from_id": 1189, "to_id": 1522, "value": null, "__typename": "links" }, { "id": 1554, "type_id": 18, "from_id": 1380, "to_id": 1536, "value": null, "__typename": "links" }, { "id": 1555, "type_id": 3, "from_id": 1189, "to_id": 1554, "value": null, "__typename": "links" }, { "id": 1384, "type_id": 55, "from_id": 1189, "to_id": 1383, "value": { "id": 47, "value": { "x": 25, "y": 11 }, "link_id": 1384 }, "__typename": "links" }, { "id": 1385, "type_id": 3, "from_id": 1189, "to_id": 1384, "value": null, "__typename": "links" }, { "id": 1189, "type_id": 22, "from_id": 0, "to_id": 0, "value": null, "__typename": "links" }, { "id": 1408, "type_id": 58, "from_id": 0, "to_id": 0, "value": { "id": 50, "value": { "id": 125 }, "link_id": 1408 }, "__typename": "links" }, { "id": 1409, "type_id": 3, "from_id": 1189, "to_id": 1408, "value": null, "__typename": "links" }, { "id": 1410, "type_id": 92, "from_id": 1189, "to_id": 1408, "value": null, "__typename": "links" }, { "id": 1411, "type_id": 3, "from_id": 1189, "to_id": 1410, "value": null, "__typename": "links" }, { "id": 1412, "type_id": 799, "from_id": 125, "to_id": 1408, "value": null, "__typename": "links" }, { "id": 1413, "type_id": 3, "from_id": 1189, "to_id": 1412, "value": null, "__typename": "links" }, { "id": 1416, "type_id": 16, "from_id": 1390, "to_id": 125, "value": null, "__typename": "links" }, { "id": 1417, "type_id": 3, "from_id": 1189, "to_id": 1416, "value": { "id": 434, "value": "myRuleActionSelectorInclude", "link_id": 1417 }, "__typename": "links" }, { "id": 1418, "type_id": 55, "from_id": 1189, "to_id": 1417, "value": { "id": 52, "value": { "x": -119, "y": 30 }, "link_id": 1418 }, "__typename": "links" }, { "id": 1419, "type_id": 3, "from_id": 1189, "to_id": 1418, "value": null, "__typename": "links" }, { "id": 1456, "type_id": 55, "from_id": 1189, "to_id": 1444, "value": { "id": 58, "value": { "x": -16, "y": 151 }, "link_id": 1456 }, "__typename": "links" }, { "id": 1457, "type_id": 3, "from_id": 1189, "to_id": 1456, "value": null, "__typename": "links" }, { "id": 1486, "type_id": 55, "from_id": 1189, "to_id": 1485, "value": { "id": 64, "value": { "x": 40, "y": -72 }, "link_id": 1486 }, "__typename": "links" }, { "id": 1487, "type_id": 3, "from_id": 1189, "to_id": 1486, "value": null, "__typename": "links" }, { "id": 1528, "type_id": 19, "from_id": 1380, "to_id": 1502, "value": null, "__typename": "links" }, { "id": 1529, "type_id": 3, "from_id": 1189, "to_id": 1528, "value": { "id": 445, "value": "myRuleObject", "link_id": 1529 }, "__typename": "links" }, { "id": 1540, "type_id": 55, "from_id": 1189, "to_id": 1539, "value": { "id": 74, "value": { "x": 130.9999999999999, "y": -274 }, "link_id": 1540 }, "__typename": "links" }, { "id": 1541, "type_id": 3, "from_id": 1189, "to_id": 1540, "value": null, "__typename": "links" }, { "id": 1458, "type_id": 55, "from_id": 1189, "to_id": 1425, "value": { "id": 59, "value": { "x": -82, "y": 117 }, "link_id": 1458 }, "__typename": "links" }, { "id": 1459, "type_id": 3, "from_id": 1189, "to_id": 1458, "value": null, "__typename": "links" }, { "id": 1502, "type_id": 15, "from_id": 0, "to_id": 0, "value": null, "__typename": "links" }, { "id": 1503, "type_id": 55, "from_id": 1189, "to_id": 1502, "value": { "id": 67, "value": { "x": 259.9999999999999, "y": 198 }, "link_id": 1503 }, "__typename": "links" }, { "id": 1504, "type_id": 3, "from_id": 1189, "to_id": 1503, "value": null, "__typename": "links" }, { "id": 1505, "type_id": 3, "from_id": 1189, "to_id": 1502, "value": { "id": 443, "value": "myRuleObjectSelector", "link_id": 1505 }, "__typename": "links" }, { "id": 1530, "type_id": 55, "from_id": 1189, "to_id": 1529, "value": { "id": 72, "value": { "x": -1.1368683772161603e-13, "y": 213 }, "link_id": 1530 }, "__typename": "links" }, { "id": 1531, "type_id": 3, "from_id": 1189, "to_id": 1530, "value": null, "__typename": "links" }, { "id": 1414, "type_id": 55, "from_id": 1189, "to_id": 125, "value": { "id": 51, "value": { "x": -659, "y": -206 }, "link_id": 1414 }, "__typename": "links" }, { "id": 1415, "type_id": 3, "from_id": 1189, "to_id": 1414, "value": null, "__typename": "links" }, { "id": 1465, "type_id": 55, "from_id": 1189, "to_id": 1464, "value": { "id": 60, "value": { "x": 281, "y": -156 }, "link_id": 1465 }, "__typename": "links" }, { "id": 1466, "type_id": 3, "from_id": 1189, "to_id": 1465, "value": null, "__typename": "links" }, { "id": 1468, "type_id": 55, "from_id": 1189, "to_id": 1467, "value": { "id": 61, "value": { "x": 211, "y": -90 }, "link_id": 1468 }, "__typename": "links" }, { "id": 1469, "type_id": 3, "from_id": 1189, "to_id": 1468, "value": null, "__typename": "links" }, { "id": 1493, "type_id": 55, "from_id": 1189, "to_id": 1492, "value": { "id": 65, "value": { "x": 679.9999999999999, "y": -131 }, "link_id": 1493 }, "__typename": "links" }, { "id": 1494, "type_id": 3, "from_id": 1189, "to_id": 1493, "value": null, "__typename": "links" }, { "id": 1536, "type_id": 15, "from_id": 0, "to_id": 0, "value": null, "__typename": "links" }, { "id": 1537, "type_id": 55, "from_id": 1189, "to_id": 1536, "value": { "id": 73, "value": { "x": 107.99999999999989, "y": -359 }, "link_id": 1537 }, "__typename": "links" }, { "id": 1538, "type_id": 3, "from_id": 1189, "to_id": 1537, "value": null, "__typename": "links" }, { "id": 1539, "type_id": 3, "from_id": 1189, "to_id": 1536, "value": { "id": 447, "value": "myRuleSubjectSelector", "link_id": 1539 }, "__typename": "links" } ], "loading": false, "networkStatus": 7 } ```Chanages I have tried to do after the actions described above
→Create SelectorTree from every SelectorInclude to joinTree
It does not work. I still get error→Create SelectorTree from every SelectorInclude to containTree
It does not work. I still get error→Check permissions by using deep.can
```ts await deep.can( await deep.id("@deep-foundation/core", "Type"), await deep.id("@deep-foundation/core", "AllowInsertType"), 1217 // user id ) ``` falseCreate rule by using `@l4egenda/rule-editor`
![image](https://github.com/deep-foundation/deeplinks/assets/66206278/54e68eeb-cca7-493b-acbd-7e28450899c4) ```ts await deep.can( await deep.id("@deep-foundation/core", "Type"), await deep.id("@deep-foundation/core", "AllowInsertType"), 1217 // user id ) ``` false