Fix failing tests (which caught a bug in the new client query)

This commit is contained in:
Dane Everitt 2020-07-09 21:32:31 -07:00
parent 82d7fa1c53
commit 4122486468
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 32 additions and 7 deletions

View file

@ -17,6 +17,11 @@ class RecoveryToken extends Model
*/
const UPDATED_AT = null;
/**
* @var bool
*/
public $timestamps = true;
/**
* @var bool
*/

View file

@ -266,11 +266,11 @@ class User extends Model implements
* Returns all of the servers that a user can access by way of being the owner of the
* server, or because they are assigned as a subuser for that server.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
* @return \Illuminate\Database\Eloquent\Builder
*/
public function accessibleServers()
{
return $this->hasMany(Server::class, 'owner_id')
return Server::query()
->select('servers.*')
->leftJoin('subusers', 'subusers.server_id', '=', 'servers.id')
->where(function (Builder $builder) {