mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6492 from open-sausages/pulls/4.0/security-page-class
API Shift Security page class config to separate option
This commit is contained in:
commit
b64b4497ca
@ -124,6 +124,14 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
*/
|
*/
|
||||||
private static $template_main = 'Page';
|
private static $template_main = 'Page';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to use for page rendering
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @config
|
||||||
|
*/
|
||||||
|
private static $page_class = 'Page';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default message set used in permission failures.
|
* Default message set used in permission failures.
|
||||||
*
|
*
|
||||||
@ -515,7 +523,7 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use the default setting for which Page to use to render the security page
|
// Use the default setting for which Page to use to render the security page
|
||||||
$pageClass = (string) $this->stat('template_main');
|
$pageClass = $this->stat('page_class');
|
||||||
$tmpPage = new $pageClass;
|
$tmpPage = new $pageClass;
|
||||||
$tmpPage->Title = $title;
|
$tmpPage->Title = $title;
|
||||||
/** @skipUpgrade */
|
/** @skipUpgrade */
|
||||||
|
Loading…
Reference in New Issue
Block a user