forked from Lan2Play/eventula-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Lan2Play#903 from Lan2Play/dev
Add Legacywarning (master)
- Loading branch information
Showing
7 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use Closure; | ||
use Illuminate\Http\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Auth; | ||
|
||
|
||
class Legacywarning | ||
{ | ||
/** | ||
* Handle an incoming request. | ||
* | ||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next | ||
*/ | ||
public function handle(Request $request, Closure $next): Response | ||
{ | ||
|
||
if ((Auth::check() && Auth::user()->getAdmin()) && ! config('admin.disable_legacy_warning')) { | ||
Auth::getSession()->flash('alert-warning', __('legacywarning.infotext')); | ||
} | ||
|
||
|
||
return $next($request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php | ||
return [ | ||
'super_danger_zone' => env('I_KNOW_WHAT_I_AM_DOING_ENABLE_SUPER_DANGER_ZONE', false) | ||
'super_danger_zone' => env('I_KNOW_WHAT_I_AM_DOING_ENABLE_SUPER_DANGER_ZONE', false), | ||
'disable_legacy_warning' => env('DISABLE_LEGACY_WARNING', false) | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Legacywarning | ||
|-------------------------------------------------------------------------- | ||
| | ||
| | ||
*/ | ||
|
||
'infotext' => 'Diese Version von Eventula wird im Dezember in einen legacy branch verschoben und danach, auch im Falle von Sicherheitslücken, nicht mehr aktualisiert. Für alle Handlungsmöglichkeiten und Informationen zu den anstehenden Veränderungen, bitte unseren zugehörigen Github Issue https://github.com/Lan2Play/eventula-manager/issues/842 lesen. Dort ist auch beschrieben wie sich diese Meldung deaktivieren lässt. Sollte diese Instanz mit unserem lan2play/eventula-manager:latest oder lan2play/eventula-manager:dev Docker Image betrieben werden, ist keine Aktion erforderlich um zukünftig weiterhin Funktions und Sicherheitsupdates zu erhalten, die jedoch auch die bisherige Kernfunktionalität verändern werden.', | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Legacywarning | ||
|-------------------------------------------------------------------------- | ||
| | ||
| | ||
*/ | ||
|
||
'infotext' => 'This version of Eventula will be moved to a legacy branch in December and will no longer be updated, even in the case of security vulnerabilities. For all available actions and information about the upcoming changes, please read our corresponding Github issue at https://github.com/Lan2Play/eventula-manager/issues/842 . It also describes how to disable this message. If this instance is running with our lan2play/eventula-manager:latest or lan2play/eventula-manager:dev Docker image, no action is required to continue receiving future functional and security updates, although these updates may change the previous core functionality.', | ||
|
||
]; |