Develop to master (#9195)

* Added saml custom setting retrieveParametersFromServer to enable fixing SLO issues with Azure AD (#9187)

* [FIX] Lite test email won't use the mail component (#9092)

* [FIX] Lite test email won't use the mail component

* Revert "[FIX] Lite test email won't use the mail component"

This reverts commit 6dab9aa1a8.

* Fix check for snipeSettings

* Remove random text from message template

* Revert "Fix check for snipeSettings"

This reverts commit 887dcc7bbc.

* Fix test notification with setupCompleted

Co-authored-by: johnson-yi <63399474+johnson-yi@users.noreply.github.com>
Co-authored-by: Oliver Walerys <owalerys@users.noreply.github.com>
This commit is contained in:
snipe 2021-02-23 14:53:55 -08:00 committed by GitHub
parent 47b2fe571e
commit f5dda06c55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 2 deletions

View file

@ -128,7 +128,8 @@ class SamlController extends Controller
public function sls(Request $request) public function sls(Request $request)
{ {
$auth = $this->saml->getAuth(); $auth = $this->saml->getAuth();
$sloUrl = $auth->processSLO(true, null, null, null, true); $retrieveParametersFromServer = $this->saml->getSetting('retrieveParametersFromServer', false);
$sloUrl = $auth->processSLO(true, null, $retrieveParametersFromServer, null, true);
$errors = $auth->getErrors(); $errors = $auth->getErrors();
if (!empty($errors)) { if (!empty($errors)) {

View file

@ -324,6 +324,20 @@ class Saml
return $this->_auth; return $this->_auth;
} }
/**
* Get a setting.
*
* @author Johnson Yi <jyi.dev@outlook.com>
*
* @param string|array|int $key
* @param mixed $default
*
* @return void
*/
public function getSetting($key, $default = null) {
return data_get($this->_settings, $key, $default);
}
/** /**
* Gets the SP metadata. The XML representation. * Gets the SP metadata. The XML representation.
* *

View file

@ -1,7 +1,11 @@
@if ($setupCompleted = \App\Models\Setting::setupCompleted())
@component('mail::message') @component('mail::message')
@endif
{{ trans('mail.test_mail_text') }} {{ trans('mail.test_mail_text') }}
Thanks, Thanks,
Snipe-IT Snipe-IT
@if ($setupCompleted)
@endcomponent @endcomponent
@endif

View file

@ -45,7 +45,7 @@ Snipe-IT
@endif @endif
@if ($snipeSettings->privacy_policy_link!='') @if ($snipeSettings->privacy_policy_link!='')
<a href="{{ $snipeSettings->privacy_policy_link }}">{{ trans('admin/settings/general.privacy_policy') }}</a>ldfkgjg <a href="{{ $snipeSettings->privacy_policy_link }}">{{ trans('admin/settings/general.privacy_policy') }}</a>
@endif @endif
@endcomponent @endcomponent