fix: remove legacy permission check in stat

This commit is contained in:
KernelDeimos
2024-06-13 17:51:20 -04:00
committed by Eric Dubé
parent d128ceed6f
commit f2c6e01296
@@ -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)