File tree 2 files changed +19
-16
lines changed
2 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -37,14 +37,15 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain
37
37
- Fix index issue happening when deleting a single property in a sorted collection #545
38
38
- Update JS assets & playwright
39
39
- Fix initial indexing bug #560
40
- - Fix errors on succesful export / import #565
41
40
- Fix envs for store path, change ` ATOMIC_STORE_DIR ` to ` ATOMIC_DATA_DIR ` #567
42
41
- Refactor static file asset hosting #578
43
42
- Meta tags server side #577
44
43
- Include JSON-AD in initial response, speed up first render #511
45
44
- Remove feature to index external RDF files and search them #579
46
45
- Add staging environment #588
47
46
- Add systemd instructions to readme #271
47
+ - Improve check_append error #558
48
+ - Fix errors on successful export / import #565
48
49
49
50
## [ v0.34.0] - 2022-10-31
50
51
Original file line number Diff line number Diff line change @@ -69,22 +69,24 @@ pub fn check_append(
69
69
resource : & Resource ,
70
70
for_agent : & str ,
71
71
) -> AtomicResult < String > {
72
- let parent = if let Ok ( parent) = resource. get_parent ( store) {
73
- parent
74
- } else {
75
- if resource
76
- . get_classes ( store) ?
77
- . iter ( )
78
- . map ( |c| c. subject . clone ( ) )
79
- . collect :: < String > ( )
80
- . contains ( urls:: DRIVE )
81
- {
82
- return Ok ( String :: from ( "Drive without a parent can be created" ) ) ;
72
+ let parent = match resource. get_parent ( store) {
73
+ Ok ( p) => p,
74
+ Err ( e) => {
75
+ if resource
76
+ . get_classes ( store) ?
77
+ . iter ( )
78
+ . map ( |c| c. subject . clone ( ) )
79
+ . collect :: < String > ( )
80
+ . contains ( urls:: DRIVE )
81
+ {
82
+ return Ok ( String :: from ( "Drive without a parent can be created" ) ) ;
83
+ }
84
+ return Err ( AtomicError :: unauthorized ( format ! (
85
+ "Can't append to {} because it's parent cannot be found: {}" ,
86
+ resource. get_subject( ) ,
87
+ e
88
+ ) ) ) ;
83
89
}
84
- return Err ( AtomicError :: unauthorized ( format ! (
85
- "No parent found for {}" ,
86
- resource. get_subject( )
87
- ) ) ) ;
88
90
} ;
89
91
if let Ok ( msg) = check_rights ( store, & parent, for_agent, Right :: Append ) {
90
92
Ok ( msg)
You can’t perform that action at this time.
0 commit comments