mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Bypass company scoping if user is an admin
This commit is contained in:
parent
dec95c3e06
commit
bfe4bc6ee5
|
@ -129,7 +129,7 @@ final class Company extends Model
|
|||
|
||||
public static function scopeCompanyables($query, $column = 'company_id')
|
||||
{
|
||||
if (!static::isFullMultipleCompanySupportEnabled()) {
|
||||
if (!static::isFullMultipleCompanySupportEnabled() || Auth::user()->isSuperUser()) {
|
||||
return $query;
|
||||
} else {
|
||||
return static::scopeCompanyablesDirectly($query, $column);
|
||||
|
|
Loading…
Reference in a new issue