mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Make sure the demo user can't export data.
This commit is contained in:
@@ -65,6 +65,12 @@ class IndexController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function export(): LaravelResponse
|
public function export(): LaravelResponse
|
||||||
{
|
{
|
||||||
|
if(auth()->user()->hasRole('demo')) {
|
||||||
|
session()->flash('info', (string) trans('firefly.demo_user_export'));
|
||||||
|
return redirect(route('export.index'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @var ExportDataGenerator $generator */
|
/** @var ExportDataGenerator $generator */
|
||||||
$generator = app(ExportDataGenerator::class);
|
$generator = app(ExportDataGenerator::class);
|
||||||
$generator->setUser(auth()->user());
|
$generator->setUser(auth()->user());
|
||||||
|
@@ -2369,6 +2369,7 @@ return [
|
|||||||
'block_code_bounced' => 'Email message(s) bounced',
|
'block_code_bounced' => 'Email message(s) bounced',
|
||||||
'block_code_expired' => 'Demo account expired',
|
'block_code_expired' => 'Demo account expired',
|
||||||
'no_block_code' => 'No reason for block or user not blocked',
|
'no_block_code' => 'No reason for block or user not blocked',
|
||||||
|
'demo_user_export' => 'The demo user cannot export data',
|
||||||
'block_code_email_changed' => 'User has not yet confirmed new email address',
|
'block_code_email_changed' => 'User has not yet confirmed new email address',
|
||||||
'admin_update_email' => 'Contrary to the profile page, the user will NOT be notified their email address has changed!',
|
'admin_update_email' => 'Contrary to the profile page, the user will NOT be notified their email address has changed!',
|
||||||
'update_user' => 'Update user',
|
'update_user' => 'Update user',
|
||||||
|
Reference in New Issue
Block a user