diff --git a/app/Models/Team.php b/app/Models/Team.php index 33847a3c8..8651df3c8 100644 --- a/app/Models/Team.php +++ b/app/Models/Team.php @@ -120,22 +120,10 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen return Attribute::make( get: function () { if (config('constants.coolify.self_hosted') || $this->id === 0) { - $subscription = 'self-hosted'; - } else { - $subscription = data_get($this, 'subscription'); - if (is_null($subscription)) { - $subscription = 'zero'; - } else { - $subscription = $subscription->type(); - } - } - if ($this->custom_server_limit) { - $serverLimit = $this->custom_server_limit; - } else { - $serverLimit = config('constants.limits.server')[strtolower($subscription)]; + return 999999999999; } - return $serverLimit ?? 2; + return $this->custom_server_limit ?? 2; } ); } diff --git a/config/constants.php b/config/constants.php index 3f3ce2a74..537fbfc6c 100644 --- a/config/constants.php +++ b/config/constants.php @@ -65,26 +65,6 @@ return [ ], ], - 'limits' => [ - 'trial_period' => 0, - 'server' => [ - 'zero' => 0, - 'self-hosted' => 999999999999, - 'basic' => env('LIMIT_SERVER_BASIC', 2), - 'pro' => env('LIMIT_SERVER_PRO', 10), - 'ultimate' => env('LIMIT_SERVER_ULTIMATE', 25), - 'dynamic' => env('LIMIT_SERVER_DYNAMIC', 2), - ], - 'email' => [ - 'zero' => true, - 'self-hosted' => true, - 'basic' => true, - 'pro' => true, - 'ultimate' => true, - 'dynamic' => true, - ], - ], - 'sentry' => [ 'sentry_dsn' => env('SENTRY_DSN'), ],