Added Demo mode
Demo mode allows to safely run a demo version of the app, with destructive features limited. Some bugs were also fixed in this commit.
This commit is contained in:
@@ -62,6 +62,13 @@ class TeamFileController extends Controller
|
||||
{
|
||||
$this->authorize('store', TeamFile::class);
|
||||
|
||||
if (config('demo.is_enabled'))
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'This feature is disabled');
|
||||
}
|
||||
|
||||
try {
|
||||
$caption = $request->caption;
|
||||
$description = $request->description;
|
||||
@@ -110,6 +117,13 @@ class TeamFileController extends Controller
|
||||
{
|
||||
$this->authorize('delete', $teamFile);
|
||||
|
||||
if (config('demo.is_enabled'))
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'This feature is disabled');
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Storage::delete($teamFile->fs_location);
|
||||
|
Reference in New Issue
Block a user