File tree 1 file changed +8
-0
lines changed
src/backend/src/filesystem
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,13 @@ module.exports = class FSNodeContext {
659
659
await this . fetchEntry ( ) ;
660
660
return this . isRoot ;
661
661
}
662
+
663
+ if ( key === 'writable' ) {
664
+ const actor = Context . get ( 'actor' ) ;
665
+ if ( ! actor || ! actor . type . user ) return undefined ;
666
+ const svc_acl = this . services . get ( 'acl' ) ;
667
+ return await svc_acl . check ( actor , this , 'write' ) ;
668
+ }
662
669
663
670
throw new Error ( `unrecognize key for FSNodeContext.get: ${ key } ` ) ;
664
671
}
@@ -789,6 +796,7 @@ module.exports = class FSNodeContext {
789
796
790
797
fsentry . dirname = _path . dirname ( fsentry . path ) ;
791
798
fsentry . dirpath = fsentry . dirname ;
799
+ fsentry . writable = await this . get ( 'writable' ) ;
792
800
793
801
// Do not send internal IDs to clients
794
802
fsentry . id = res . uuid ;
You can’t perform that action at this time.
0 commit comments