Skip to content

Commit

Permalink
fix: properly add owner object to fsentries
Browse files Browse the repository at this point in the history
KernelDeimos committed Sep 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a70d0dd commit 04c05a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/backend/src/filesystem/FSNodeContext.js
Original file line number Diff line number Diff line change
@@ -777,6 +777,16 @@ module.exports = class FSNodeContext {
fsentry[k] = res[k];
}

let actor; try {
actor = Context.get('actor');
} catch (e) {}
if ( ! actor?.type?.user || actor.type.user.id !== res.user_id ) {
if ( ! fsentry.owner ) await this.fetchOwner();
fsentry.owner = {
username: res.owner?.username,
};
}

const info = this.services.get('information');

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

0 comments on commit 04c05a5

Please sign in to comment.