mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 00:54:07 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
0a73297f24
|
@ -86,11 +86,17 @@ final class Company extends Model
|
||||||
} else {
|
} else {
|
||||||
$current_user = Auth::user();
|
$current_user = Auth::user();
|
||||||
|
|
||||||
if ($current_user->company_id != null) {
|
// Super users should be able to set a company to whatever they need
|
||||||
return $current_user->company_id;
|
if ($current_user->isSuperUser()) {
|
||||||
} else {
|
|
||||||
return static::getIdFromInput($unescaped_input);
|
return static::getIdFromInput($unescaped_input);
|
||||||
|
} else {
|
||||||
|
if ($current_user->company_id != null) {
|
||||||
|
return $current_user->company_id;
|
||||||
|
} else {
|
||||||
|
return static::getIdFromInput($unescaped_input);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue