Skip to content

Commit

Permalink
Fix for document permissions (#2415)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed Oct 5, 2018
1 parent 046085e commit e254cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/EntityModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function scopeScope($query, $publicId = false, $accountId = false)
}
}

if (Auth::check() && method_exists($this, 'getEntityType') && ! Auth::user()->hasPermission('view_' . $this->getEntityType()) && $this->getEntityType() != ENTITY_TAX_RATE) {
if (Auth::check() && method_exists($this, 'getEntityType') && ! Auth::user()->hasPermission('view_' . $this->getEntityType()) && $this->getEntityType() != ENTITY_TAX_RATE && $this->getEntityType() != ENTITY_DOCUMENT) {
$query->where(Utils::pluralizeEntityType($this->getEntityType()) . '.user_id', '=', Auth::user()->id);
}

Expand Down

0 comments on commit e254cf3

Please sign in to comment.