tweak: avoid use of puter global in Perms module

This commit is contained in:
KernelDeimos
2025-12-03 18:49:31 -05:00
committed by Eric Dubé
parent ef6dea2bec
commit 09b8c29e2f
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -458,6 +458,7 @@ const puterInit = (function () {
registerModule (name, cls, parameters = {}) {
const instance = new cls(this.context, parameters);
instance.puter = this;
this.modules_.push(name);
this[name] = instance;
if ( instance._init ) instance._init({ puter: this });
+1 -1
View File
@@ -131,7 +131,7 @@ export default class Perms {
permission: `user:${whoami.uuid}:email:read`,
});
if ( granted ) {
whoami = await puter.auth.whoami();
whoami = await this.puter.auth.whoami();
}
return whoami.email;
}