Compare commits

...

4 Commits

Author SHA1 Message Date
snipe 74b26a349c Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2020-11-24 13:54:02 -08:00
snipe e9bfb157bb Bumped version. Again. 2020-11-24 13:53:28 -08:00
snipe ef957399aa Merge remote-tracking branch 'origin/develop' 2020-11-24 13:51:19 -08:00
snipe 973eacf6c3 Small fixes for SAML
The SAML routes are in a service provide (sigh), so they did not have the `web` middleware group assigned to it.

I also added some additional checks so that the setup blade won’t fail (the migrations wouldn’t have been run yet, so outside of a try/catch, it would return an error since those tables don’t exist.)
2020-11-24 13:51:02 -08:00
4 changed files with 45 additions and 20 deletions
+35 -10
View File
@@ -17,16 +17,41 @@ class AssetCountForSidebar
*/
public function handle($request, Closure $next)
{
$total_rtd_sidebar = Asset::RTD()->count();
$total_deployed_sidebar = Asset::Deployed()->count();
$total_archived_sidebar = Asset::Archived()->count();
$total_pending_sidebar = Asset::Pending()->count();
$total_undeployable_sidebar = Asset::Undeployable()->count();
view()->share('total_rtd_sidebar', $total_rtd_sidebar);
view()->share('total_deployed_sidebar', $total_deployed_sidebar);
view()->share('total_archived_sidebar', $total_archived_sidebar);
view()->share('total_pending_sidebar', $total_pending_sidebar);
view()->share('total_undeployable_sidebar', $total_undeployable_sidebar);
try
{
$total_rtd_sidebar = Asset::RTD()->count();
view()->share('total_rtd_sidebar', $total_rtd_sidebar);
} catch (\Exception $e) {
\Log::debug($e);
}
try {
$total_deployed_sidebar = Asset::Deployed()->count();
view()->share('total_deployed_sidebar', $total_deployed_sidebar);
} catch (\Exception $e) {
\Log::debug($e);
}
try {
$total_archived_sidebar = Asset::Archived()->count();
view()->share('total_archived_sidebar', $total_archived_sidebar);
} catch (\Exception $e) {
\Log::debug($e);
}
try {
$total_pending_sidebar = Asset::Pending()->count();
view()->share('total_pending_sidebar', $total_pending_sidebar);
} catch (\Exception $e) {
\Log::debug($e);
}
try {
$total_undeployable_sidebar = Asset::Undeployable()->count();
view()->share('total_undeployable_sidebar', $total_undeployable_sidebar);
} catch (\Exception $e) {
\Log::debug($e);
}
return $next($request);
}
+1 -1
View File
@@ -49,7 +49,7 @@ class SamlServiceProvider extends ServiceProvider
'uses' => 'Auth\SamlController@login' ]
);
Route::group(['prefix' => 'admin','middleware' => ['auth', 'authorize:superuser']], function () {
Route::group(['prefix' => 'admin','middleware' => ['web','auth', 'authorize:superuser']], function () {
Route::get('saml', ['as' => 'settings.saml.index','uses' => 'SettingsController@getSamlSettings' ]);
Route::post('saml', ['as' => 'settings.saml.save','uses' => 'SettingsController@postSamlSettings' ]);
+4 -4
View File
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v5.0.8',
'full_app_version' => 'v5.0.8 - build 5616-8a38b9d',
'app_version' => 'v5.0.9',
'full_app_version' => 'v5.0.9 - build 5616-973eacf6c3',
'build_version' => '5616',
'prerelease_version' => '',
'hash_version' => '8a38b9d',
'full_hash' => 'v5.0.8-87-8a38b9d',
'hash_version' => '973eacf6c3',
'full_hash' => 'v5.0.9-87-973eacf6c3',
'branch' => 'master',
);
+5 -5
View File
@@ -422,7 +422,7 @@
<i class="fa fa-circle-o text-blue"></i>
{{ trans('general.all') }}
{{ trans('general.deployed') }}
({{ ($total_deployed_sidebar) ? $total_deployed_sidebar : '' }})
({{ (isset($total_deployed_sidebar)) ? $total_deployed_sidebar : '' }})
</a>
</li>
<li{!! (Request::query('status') == 'RTD' ? ' class="active"' : '') !!}>
@@ -430,25 +430,25 @@
<i class="fa fa-circle-o text-green"></i>
{{ trans('general.all') }}
{{ trans('general.ready_to_deploy') }}
({{ ($total_rtd_sidebar) ? $total_rtd_sidebar : '' }})
({{ (isset($total_rtd_sidebar)) ? $total_rtd_sidebar : '' }})
</a>
</li>
<li{!! (Request::query('status') == 'Pending' ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Pending') }}"><i class="fa fa-circle-o text-orange"></i>
{{ trans('general.all') }}
{{ trans('general.pending') }}
({{ ($total_pending_sidebar) ? $total_pending_sidebar : '' }})
({{ (isset($total_pending_sidebar)) ? $total_pending_sidebar : '' }})
</a>
</li>
<li{!! (Request::query('status') == 'Undeployable' ? ' class="active"' : '') !!} ><a href="{{ url('hardware?status=Undeployable') }}"><i class="fa fa-times text-red"></i>
{{ trans('general.all') }}
{{ trans('general.undeployable') }}
({{ ($total_undeployable_sidebar) ? $total_undeployable_sidebar : '' }})
({{ (isset($total_undeployable_sidebar)) ? $total_undeployable_sidebar : '' }})
</a>
</li>
<li{!! (Request::query('status') == 'Archived' ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Archived') }}"><i class="fa fa-times text-red"></i>
{{ trans('general.all') }}
{{ trans('admin/hardware/general.archived') }}
({{ ($total_archived_sidebar) ? $total_archived_sidebar : '' }})
({{ (isset($total_archived_sidebar)) ? $total_archived_sidebar : '' }})
</a>
</li>
<li{!! (Request::query('status') == 'Requestable' ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Requestable') }}"><i class="fa fa-check text-blue"></i>