Fix: Disable API by default
This commit is contained in:
		@@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use Illuminate\Database\Migrations\Migration;
 | 
				
			||||||
 | 
					use Illuminate\Database\Schema\Blueprint;
 | 
				
			||||||
 | 
					use Illuminate\Support\Facades\Schema;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return new class extends Migration
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Run the migrations.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public function up(): void
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Schema::table('instance_settings', function (Blueprint $table) {
 | 
				
			||||||
 | 
					            $table->boolean('is_api_enabled')->default(false)->change();
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
@@ -6,7 +6,7 @@
 | 
				
			|||||||
        <div class="pb-4 ">
 | 
					        <div class="pb-4 ">
 | 
				
			||||||
            <h2>API Tokens</h2>
 | 
					            <h2>API Tokens</h2>
 | 
				
			||||||
            @if (!$instanceSettings->is_api_enabled)
 | 
					            @if (!$instanceSettings->is_api_enabled)
 | 
				
			||||||
            <strong>API is disabled. If you want to use API, please enable it in the Instance Settings.</strong>
 | 
					            <strong>API is disabled. If you want to use the API, please enable it in the Coolify Instance Settings.</strong>
 | 
				
			||||||
            @else
 | 
					            @else
 | 
				
			||||||
            <div>Tokens are created with the current team as scope. You will only have access to this team's resources.
 | 
					            <div>Tokens are created with the current team as scope. You will only have access to this team's resources.
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user