Skip to content

Commit

Permalink
feat: add instance administrator (#6670)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Jun 12, 2023
1 parent 5bf45b6 commit ab3f380
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ protected function hideSensitiveRequestDetails()
*/
protected function gate()
{
Gate::define('viewTelescope', fn ($user) => $user->is_account_administrator);
Gate::define('viewTelescope', fn ($user) => $user->is_instance_administrator);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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('users', function (Blueprint $table) {
$table->boolean('is_instance_administrator')->default(false)->after('is_account_administrator');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('is_instance_administrator');
});
}
};

0 comments on commit ab3f380

Please sign in to comment.