Compare commits

..

2 Commits

Author SHA1 Message Date
37adb14b9e Remove deprecated Domain::managed()
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 39s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m50s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2024-05-29 19:20:26 +10:00
58adb63174 Fix for when no zones have been created yet in a domain 2024-05-29 19:20:26 +10:00

View File

@ -69,7 +69,8 @@ class Domain extends Model
public function getCanAcceptAppAttribute(): bool
{
return our_address($this)->count()
return ($x=our_address($this))
&& $x->count()
&& $this->active
&& $this->accept_app
&& Auth::id()
@ -130,9 +131,10 @@ class Domain extends Model
*/
public function isManaged(): bool
{
$x = our_address();
return $x && $x->pluck('zone.domain')->pluck('id')->contains($this->id);
return ($x=our_address())
&& $x->pluck('zone.domain')
->pluck('id')
->contains($this->id);
}
/**