Skip to content

Commit 04c05a5

Browse files
committed
fix: properly add owner object to fsentries
1 parent a70d0dd commit 04c05a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/backend/src/filesystem/FSNodeContext.js

+10
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,16 @@ module.exports = class FSNodeContext {
777777
fsentry[k] = res[k];
778778
}
779779

780+
let actor; try {
781+
actor = Context.get('actor');
782+
} catch (e) {}
783+
if ( ! actor?.type?.user || actor.type.user.id !== res.user_id ) {
784+
if ( ! fsentry.owner ) await this.fetchOwner();
785+
fsentry.owner = {
786+
username: res.owner?.username,
787+
};
788+
}
789+
780790
const info = this.services.get('information');
781791

782792
if ( ! this.uid && ! this.entry.uuid ) {

0 commit comments

Comments
 (0)