mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Minor fixes
This commit is contained in:
parent
cc563a9d5e
commit
d7d0768eae
@ -35,6 +35,7 @@ class CompanyFactory
|
||||
$company->custom_fields = (object) [];
|
||||
$company->subdomain = '';
|
||||
$company->enabled_modules = config('ninja.enabled_modules'); //32767;//8191; //4095
|
||||
$company->default_password_timeout = 30;
|
||||
|
||||
return $company;
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ class UserFactory
|
||||
$user->failed_logins = 0;
|
||||
$user->signature = '';
|
||||
$user->theme_id = 0;
|
||||
$user->default_password_timeout = 30;
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ class Company extends BaseModel
|
||||
'session_timeout',
|
||||
'oauth_password_required',
|
||||
'invoice_task_datelog',
|
||||
'default_password_timeout',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
@ -82,7 +82,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
'custom_value4',
|
||||
'is_deleted',
|
||||
'google_2fa_secret',
|
||||
'default_password_timeout',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -154,6 +154,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
'expense_amount_is_pretax' =>(bool)true, //@deprecate 1-2-2021
|
||||
'oauth_password_required' => (bool)$company->oauth_password_required,
|
||||
'session_timeout' => (int)$company->session_timeout,
|
||||
'default_password_timeout' => (int) $company->default_password_timeout,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,6 @@ class UserFactory extends Factory
|
||||
'email_verified_at' => now(),
|
||||
'password' => bcrypt(config('ninja.testvars.password')), // secret
|
||||
'remember_token' => \Illuminate\Support\Str::random(10),
|
||||
'default_password_timeout' => 30,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\Language;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
@ -21,11 +22,11 @@ class AddRussianLang extends Migration
|
||||
Language::unguard();
|
||||
Language::create($russian);
|
||||
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->integer('default_password_timeout')->default(30);
|
||||
});
|
||||
|
||||
User::whereNotNull('id')->update(['default_password_timeout' => 30]);
|
||||
Company::whereNotNull('id')->update(['default_password_timeout' => 30]);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user