Skip to content

Commit

Permalink
fix: remove legacy permission check in stat
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Jun 16, 2024
1 parent d128cee commit f2c6e01
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/backend/src/filesystem/hl_operations/hl_stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ class HLStat extends HLFilesystemOperation {
throw await svc_acl.get_safe_acl_error(actor, subject, 'read');
}

// check permission
// TODO: this check is redundant now that ACL is used;
// we will need to remove it to implement user-user permissions
if(user && !await chkperm(subject.entry, user.id, 'stat')){
throw { code:`forbidden`, message: `permission denied.`};
}

// TODO: why is this specific to stat?
const mime = this.require('mime-types');
const contentType = mime.contentType(subject.entry.name)
Expand Down

0 comments on commit f2c6e01

Please sign in to comment.