mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-05 12:40:26 -06:00
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:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user