Return false if no excluded permissions are encountered

This commit is contained in:
David Bomba 2023-02-20 20:00:10 +11:00
parent 949ea3d523
commit 2662638974
2 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class ValidCompanyQuantity implements Rule
return auth()->user()->company()->account->companies->count() < 10;
}
return auth()->user()->company()->account->companies->count() < auth()->user()->company()->account->hosted_company_count;
return auth()->user()->account->isPaid() && auth()->user()->company()->account->companies->count() < 10 ;
}
/**

View File

@ -522,6 +522,7 @@ class User extends Authenticatable implements MustVerifyEmail
}
}
return false;
}
public function documents()