mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
This commit is contained in:
commit
d40fe1b683
|
@ -58,12 +58,12 @@ class LoginController extends Controller
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(LdapAd $ldap, Saml $saml)
|
||||
public function __construct(/*LdapAd $ldap, */ Saml $saml)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware('guest', ['except' => ['logout','postTwoFactorAuth','getTwoFactorAuth','getTwoFactorEnroll']]);
|
||||
Session::put('backUrl', \URL::previous());
|
||||
$this->ldap = $ldap;
|
||||
// $this->ldap = $ldap;
|
||||
$this->saml = $saml;
|
||||
}
|
||||
|
||||
|
@ -140,10 +140,10 @@ class LoginController extends Controller
|
|||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
private function loginViaLdap(Request $request): User
|
||||
private function loginViaLdap(LdapAd $ldap, Request $request): User
|
||||
{
|
||||
try {
|
||||
return $this->ldap->ldapLogin($request->input('username'), $request->input('password'));
|
||||
return $ldap->ldapLogin($request->input('username'), $request->input('password'));
|
||||
} catch (\Exception $ex) {
|
||||
LOG::debug("LDAP user login: " . $ex->getMessage());
|
||||
throw new \Exception($ex->getMessage());
|
||||
|
@ -217,7 +217,7 @@ class LoginController extends Controller
|
|||
$user = null;
|
||||
|
||||
// Should we even check for LDAP users?
|
||||
if ($this->ldap->init()) {
|
||||
if (Setting::getSettings()->ldap_enabled) { // avoid hitting the $this->ldap
|
||||
LOG::debug("LDAP is enabled.");
|
||||
try {
|
||||
LOG::debug("Attempting to log user in by LDAP authentication.");
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
use App\Services\LdapAd;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Contracts\Support\DeferrableProvider;
|
||||
|
||||
class LdapServiceProvider extends ServiceProvider
|
||||
class LdapServiceProvider extends ServiceProvider implements DeferrableProvider
|
||||
{
|
||||
|
||||
/**
|
||||
|
@ -26,4 +27,14 @@ class LdapServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->app->singleton(LdapAd::class, LdapAd::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [LdapAd::class];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
$settings->labels_width = $settings->labels_width - $settings->labels_display_sgutter;
|
||||
$settings->labels_height = $settings->labels_height - $settings->labels_display_bgutter;
|
||||
// Leave space on bottom for 1D barcode if necessary
|
||||
$qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->alt_barcode!='') ? $settings->labels_height - .3 : $settings->labels_height - .3;
|
||||
$qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->alt_barcode!='') ? $settings->labels_height - .3 : $settings->labels_height - 0.1;
|
||||
?>
|
||||
|
||||
<style>
|
||||
|
@ -61,8 +61,8 @@ $qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->alt_barcode!='')
|
|||
height: {{ $settings->labels_height }}in;
|
||||
padding-top: {{$settings->labels_display_bgutter}}in;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: {{$settings->labels_fontsize}};
|
||||
padding-right: .01in;
|
||||
font-size: {{$settings->labels_fontsize}}pt;
|
||||
padding-right: .0001in;
|
||||
overflow: hidden !important;
|
||||
display: inline;
|
||||
word-wrap: break-word;
|
||||
|
@ -164,4 +164,4 @@ $qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->alt_barcode!='')
|
|||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</script>
|
||||
|
||||
{{-- stylesheets --}}
|
||||
<link rel="stylesheet" href="{{ mix('css/dist/all.css') }}">
|
||||
<link rel="stylesheet" href="{{ url(mix('css/dist/all.css')) }}">
|
||||
@if (($snipeSettings) && ($snipeSettings->allow_user_skin==1) && Auth::check() && Auth::user()->present()->skin != '')
|
||||
<link rel="stylesheet" href="{{ mix('css/dist/skins/skin-'.Auth::user()->present()->skin.'.min.css') }}">
|
||||
@else
|
||||
|
|
|
@ -82,6 +82,71 @@
|
|||
</div><!-- /.box-body -->
|
||||
</div> <!--/.box-->
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h2 class="box-title">{{ trans('general.accessories') }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AccessoryPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="accessoriesListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="accessoriesListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="accessoriesListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.accessories.index', ['location_id' => $location->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-accessories-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.box-body -->
|
||||
</div> <!--/.box-->
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h2 class="box-title">{{ trans('general.consumables') }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\ConsumablePresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="consumablesListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="consumablesListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
id="consumablesListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.consumables.index', ['location_id' => $location->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-locations-{{ str_slug($location->name) }}-consumables-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</div><!-- /.table-responsive -->
|
||||
</div><!-- /.box-body -->
|
||||
</div> <!--/.box-->
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
|
|
Loading…
Reference in a new issue