Don't allow users without a company to change the company of items if full company support is enabled. (#2321)

This commit is contained in:
Daniel Meltzer 2016-07-26 15:31:36 -05:00 committed by snipe
parent 0bf5c6978e
commit 9e4ac018ea

View file

@ -110,7 +110,7 @@ final class Company extends Model
public static function isCurrentUserAuthorized() public static function isCurrentUserAuthorized()
{ {
return ((!static::isFullMultipleCompanySupportEnabled()) || (Auth::user()->company_id == null) || (Auth::user()->isSuperUser())); return ((!static::isFullMultipleCompanySupportEnabled()) || (Auth::user()->isSuperUser()));
} }
public static function canManageUsersCompanies() public static function canManageUsersCompanies()