mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-06 09:30:49 +00:00
tweak: avoid use of puter global in Perms module
This commit is contained in:
@@ -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 });
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user