Merge pull request #9434 from mattclegg/bugfix--silverstripe-admin--requirements

[BUGFIX] silverstripe/admin is not required to be installed
This commit is contained in:
Robbie Averill 2020-03-16 09:48:39 -07:00 committed by GitHub
commit b6512edec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,10 +39,12 @@ class CMSSecurity extends Security
// Assign default cms theme and replace user-specified themes
SSViewer::set_themes(LeftAndMain::config()->uninherited('admin_themes'));
if (ModuleLoader::getModule('silverstripe/admin')) {
// Core styles / vendor scripts
Requirements::javascript('silverstripe/admin: client/dist/js/vendor.js');
Requirements::css('silverstripe/admin: client/dist/styles/bundle.css');
}
}
public function login($request = null, $service = Authenticator::CMS_LOGIN)
{