mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX CMSSecurity doesn't have Authenticators assigned.
This commit is contained in:
commit
0dcfa5fa9d
@ -31,5 +31,8 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
properties:
|
properties:
|
||||||
Authenticators:
|
Authenticators:
|
||||||
default: %$SilverStripe\Security\MemberAuthenticator\MemberAuthenticator
|
default: %$SilverStripe\Security\MemberAuthenticator\MemberAuthenticator
|
||||||
|
SilverStripe\Security\CMSSecurity:
|
||||||
|
properties:
|
||||||
|
Authenticators:
|
||||||
cms: %$SilverStripe\Security\MemberAuthenticator\CMSMemberAuthenticator
|
cms: %$SilverStripe\Security\MemberAuthenticator\CMSMemberAuthenticator
|
||||||
SilverStripe\Security\IdentityStore: %$SilverStripe\Security\AuthenticationHandler
|
SilverStripe\Security\IdentityStore: %$SilverStripe\Security\AuthenticationHandler
|
||||||
|
@ -165,14 +165,14 @@ PHP
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function enabled()
|
public function enabled()
|
||||||
{
|
{
|
||||||
// Disable shortcut
|
// Disable shortcut
|
||||||
if (!static::config()->get('reauth_enabled')) {
|
if (!static::config()->get('reauth_enabled')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return count(Security::singleton()->getApplicableAuthenticators(Authenticator::CMS_LOGIN)) > 0;
|
return count($this->getApplicableAuthenticators(Authenticator::CMS_LOGIN)) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -356,7 +356,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
_t('SilverStripe\\CMS\\Controllers\\ContentController.NOTLOGGEDIN', 'Not logged in')
|
_t('SilverStripe\\CMS\\Controllers\\ContentController.NOTLOGGEDIN', 'Not logged in')
|
||||||
);
|
);
|
||||||
// Tell the CMS to allow re-authentication
|
// Tell the CMS to allow re-authentication
|
||||||
if (CMSSecurity::enabled()) {
|
if (CMSSecurity::singleton()->enabled()) {
|
||||||
$response->addHeader('X-Reauthenticate', '1');
|
$response->addHeader('X-Reauthenticate', '1');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user