Skip to content

Commit

Permalink
fix injeciton of default permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskalmar committed Feb 7, 2021
1 parent 1ac02da commit 7776f07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/engine/entity/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ export class Entity {
this.defaultPermissions,
);
} else if (this.defaultPermissions) {
return processEntityPermissions(this, this.defaultPermissions);
return processEntityPermissions(this, {}, this.defaultPermissions);
}

return null;
Expand Down Expand Up @@ -842,7 +842,7 @@ export class Entity {
}

getPermissions() {
if (!this.setup.permissions || this.permissions) {
if (!this.setup.permissions && !this.defaultPermissions) {
return this.permissions;
}

Expand Down
4 changes: 2 additions & 2 deletions src/engine/entity/ViewEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export class ViewEntity {
this._defaultPermissions,
);
} else if (this._defaultPermissions) {
return processViewEntityPermissions(this, this._defaultPermissions);
return processViewEntityPermissions(this, {}, this._defaultPermissions);
}

return null;
Expand Down Expand Up @@ -478,7 +478,7 @@ export class ViewEntity {
}

getPermissions() {
if (!this._permissions || this.permissions) {
if (!this._permissions && this._defaultPermissions) {
return this.permissions;
}

Expand Down

0 comments on commit 7776f07

Please sign in to comment.