mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Merge branch 'develop' into 5.8-dev
# Conflicts: # config/firefly.php # frontend/src/i18n/nb_NO/index.js # frontend/src/i18n/nl_NL/index.js # frontend/src/i18n/ru_RU/index.js
This commit is contained in:
@@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Support\Authentication;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Role;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
use Illuminate\Contracts\Auth\UserProvider;
|
||||
@@ -63,6 +64,13 @@ class RemoteUserProvider implements UserProvider
|
||||
'password' => bcrypt(Str::random(64)),
|
||||
]
|
||||
);
|
||||
// if this is the first user, give them admin as well.
|
||||
if(1 === User::count()) {
|
||||
$roleObject = Role::where('name', 'owner')->first();
|
||||
$user->roles()->attach($roleObject);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Log::debug(sprintf('Going to return user #%d (%s)', $user->id, $user->email));
|
||||
|
||||
|
@@ -422,15 +422,6 @@ trait PeriodOverview
|
||||
Log::debug(sprintf('End for getNoCategoryPeriodOverview() is %s', $end->format('Y-m-d')));
|
||||
|
||||
// properties for cache
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty('no-category-period-entries');
|
||||
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$dates = app('navigation')->blockPeriods($start, $end, $range);
|
||||
$entries = [];
|
||||
|
||||
@@ -475,7 +466,6 @@ trait PeriodOverview
|
||||
];
|
||||
}
|
||||
Log::debug('End of loops');
|
||||
$cache->store($entries);
|
||||
|
||||
return $entries;
|
||||
}
|
||||
|
Reference in New Issue
Block a user