fix: creating app shortcut in self-hosted

For some reason ll_write has an undefined `actor` when clicking "Add
Shortcut to Desktop" from Dev Center. This should be investigated
further.
This commit is contained in:
KernelDeimos
2024-10-11 14:50:28 -04:00
parent 3157186f4f
commit 38dcb60d3f

View File

@@ -231,9 +231,10 @@ class LLCWrite extends LLWriteBase {
file, tmp, fsentry_tmp,
message,
actor,
actor: actor_let,
app_id,
} = this.values;
let actor = actor_let;
const svc = Context.get('services');
const sizeService = svc.get('sizeService');
@@ -260,6 +261,7 @@ class LLCWrite extends LLWriteBase {
}
const svc_acl = this.context.get('services').get('acl');
actor = actor ?? Actor.adapt(user) ?? Context.get('actor');
if ( ! await svc_acl.check(actor, parent, 'write') ) {
throw await svc_acl.get_safe_acl_error(actor, parent, 'write');
}