mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-19 20:14:09 -08:00
cea255995c
* refactor to clean up LDAP login, and make the login method easier to handle. * Login refactor cleanup * Google 2FA package * Adds Google Authenticator two-factor * Removed unused blade * Added optin setting in profile * Removed dumb comments * Made lock_passwords check more consistent * Additional two factor strings * Lock passwords check * Display feature disabled text if in demo mode * Two factor admin reset options * Translation strings
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class Enable2faFields extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::table('settings', function ($table) {
|
|
$table->tinyInteger('two_factor_enabled')->nullable()->default(null);
|
|
});
|
|
|
|
Schema::table('users', function ($table) {
|
|
$table->string('two_factor_secret', 32)->nullable()->default(null);
|
|
$table->boolean('two_factor_enrolled')->default(0);
|
|
$table->boolean('two_factor_optin')->default(0);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('settings', function ($table) {
|
|
$table->dropColumn('two_factor_enabled');
|
|
});
|
|
|
|
Schema::table('users', function ($table) {
|
|
$table->dropColumn('two_factor_secret');
|
|
$table->dropColumn('two_factor_enrolled');
|
|
$table->dropColumn('two_factor_optin');
|
|
});
|
|
}
|
|
}
|