diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 6a7e54cd32..ef272460f9 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -56,12 +56,15 @@ abstract class Controller extends BaseController { // is site a demo site? $isDemoSiteConfig = app('fireflyconfig')->get('is_demo_site', config('firefly.configuration.is_demo_site', false,),); - $isDemoSite = $isDemoSiteConfig ? $isDemoSiteConfig->data : false; + $isDemoSite = $isDemoSiteConfig ? $isDemoSiteConfig->data : false; app('view')->share('IS_DEMO_SITE', $isDemoSite,); app('view')->share('DEMO_USERNAME', config('firefly.demo_username')); app('view')->share('DEMO_PASSWORD', config('firefly.demo_password')); app('view')->share('FF_VERSION', config('firefly.version')); + // is webhooks enabled? + app('view')->share('featuringWebhooks', true === config('firefly.feature_flags.webhooks') && true === config('firefly.allow_webhooks')); + // share custom auth guard info. $authGuard = config('firefly.authentication_guard'); $logoutUri = config('firefly.custom_logout_uri'); @@ -95,9 +98,9 @@ abstract class Controller extends BaseController function ($request, $next) { $locale = app('steam')->getLocale(); // translations for specific strings: - $this->monthFormat = (string) trans('config.month', [], $locale); - $this->monthAndDayFormat = (string) trans('config.month_and_day', [], $locale); - $this->dateTimeFormat = (string) trans('config.date_time', [], $locale); + $this->monthFormat = (string)trans('config.month', [], $locale); + $this->monthAndDayFormat = (string)trans('config.month_and_day', [], $locale); + $this->dateTimeFormat = (string)trans('config.date_time', [], $locale); // get shown-intro-preference: if (auth()->check()) { diff --git a/database/migrations/2020_11_12_070604_changes_for_v550.php b/database/migrations/2020_11_12_070604_changes_for_v550.php index 18b1636b63..1f47cf2abb 100644 --- a/database/migrations/2020_11_12_070604_changes_for_v550.php +++ b/database/migrations/2020_11_12_070604_changes_for_v550.php @@ -116,7 +116,7 @@ class ChangesForV550 extends Migration Schema::create( 'webhooks', static function (Blueprint $table) { - $table->bigIncrements('id'); + $table->increments('id'); $table->integer('user_id', false, true); $table->softDeletes(); $table->boolean('active')->default(true); @@ -133,7 +133,7 @@ class ChangesForV550 extends Migration Schema::create( 'webhook_messages', static function (Blueprint $table) { - $table->bigIncrements('id'); + $table->increments('id'); $table->integer('webhook_id', false, true); $table->softDeletes(); $table->boolean('sent')->default(false); diff --git a/resources/views/v1/partials/menu-sidebar.twig b/resources/views/v1/partials/menu-sidebar.twig index cd0f1b05d7..37ae19feb4 100644 --- a/resources/views/v1/partials/menu-sidebar.twig +++ b/resources/views/v1/partials/menu-sidebar.twig @@ -1,223 +1,232 @@ diff --git a/resources/views/v2/layout/default.twig b/resources/views/v2/layout/default.twig index d9bdc2da35..c962e0db5a 100644 --- a/resources/views/v2/layout/default.twig +++ b/resources/views/v2/layout/default.twig @@ -27,7 +27,7 @@ - +
diff --git a/routes/web.php b/routes/web.php index fa21c69e2c..3cfd002487 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1077,6 +1077,16 @@ Route::group( } ); +/* + * Webhooks management + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Webhooks', 'prefix' => 'webhooks', 'as' => 'webhooks.'], + static function () { + Route::get('index', ['uses' => 'IndexController@index', 'as' => 'index']); + } +); + /** * For the admin routes, the user must be logged in and have the role of 'owner'. */