mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make sure the demo user can't export data.
This commit is contained in:
parent
992fdc9e27
commit
e199fdd2b6
@ -65,6 +65,12 @@ class IndexController extends Controller
|
||||
*/
|
||||
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 */
|
||||
$generator = app(ExportDataGenerator::class);
|
||||
$generator->setUser(auth()->user());
|
||||
|
@ -2369,6 +2369,7 @@ return [
|
||||
'block_code_bounced' => 'Email message(s) bounced',
|
||||
'block_code_expired' => 'Demo account expired',
|
||||
'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',
|
||||
'admin_update_email' => 'Contrary to the profile page, the user will NOT be notified their email address has changed!',
|
||||
'update_user' => 'Update user',
|
||||
|
Loading…
Reference in New Issue
Block a user