Commit Graph

189 Commits

Author SHA1 Message Date
Steve Boyd 7304acb171 NEW Cache embed shortcodes 2020-08-12 12:14:05 +12:00
Steve Boyd 8287fad24d Merge branch '4.6' into 4 2020-07-29 11:38:49 +12:00
Steve Boyd 52d38a8b4a
Merge pull request #9615 from creative-commoners/pulls/4.6/embed-iframe-dimensions
FIX Set iframe dimension attributes specified in shortcode
2020-07-28 11:04:24 +12:00
Steve Boyd f0936d4c1e FIX Set iframe dimension attributes specified in shortcode 2020-07-27 18:04:03 +12:00
Garion Herman e2443763a6
Merge pull request #9064 from creative-commoners/pulls/4.5/filter-interface
NEW Add FilterInterface and retrofit into URLSegmentFilter
2020-07-27 11:18:23 +12:00
rdigitalg 56f15b1c14 FIX Try Catch for embeded media (#9424)
* Try Catch for embeded media
* added missing namespaces, translatable message INVALID_URL
* generate tag only once
* catch after closing bracket
* space after comma
* Update src/View/Shortcodes/EmbedShortcodeProvider.php
* Linting
Co-authored-by: ivan@digitalgarage.ro <ivan@digitalgarage.ro>
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
Co-authored-by: Loz Calver <kinglozzer@gmail.com>
2020-07-17 19:38:01 +12:00
rdigitalg 3bf89b2d13
FIX Try Catch for embeded media (#9424)
* Try Catch for embeded media
* added missing namespaces, translatable message INVALID_URL
* generate tag only once
* catch after closing bracket
* space after comma
* Update src/View/Shortcodes/EmbedShortcodeProvider.php
* Linting
Co-authored-by: ivan@digitalgarage.ro <ivan@digitalgarage.ro>
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
Co-authored-by: Loz Calver <kinglozzer@gmail.com>
2020-07-03 13:04:54 +12:00
Andrew Aitken-Fincham 09dca5fa9e
Update deprecation notice to 5.0.0
Co-authored-by: Robbie Averill <robbie@averill.co.nz>
2020-06-18 21:40:20 +01:00
Andrew Aitken-Fincham 34f660a311
Update src/View/SSViewer_BasicIteratorSupport.php
Co-authored-by: Robbie Averill <robbie@averill.co.nz>
2020-06-18 21:39:32 +01:00
Andrew Aitken-Fincham 7c95237e8d update template docs, move deprecation to 5.0, capitalise Is 2020-06-15 12:25:13 +01:00
Andrew Aitken-Fincham 2e0e04f701 fix deprecation notices 2020-06-12 01:38:24 +01:00
Andrew Aitken-Fincham bac826bc06 deprecate First and Last in order to disambiguate for array lists 2020-06-11 23:45:42 +01:00
Daniel Hensby 080ce157ce
Fix various typos in comments 2020-05-16 10:34:53 +01:00
Michal Kleiner 21129b1624
Use short array syntax across the framework's codebase 2020-05-16 10:34:45 +01:00
Daniel Hensby 237b2d5f74
Convert array delcarations to short array syntax 2020-04-20 18:58:09 +01:00
Aaron Carlino 7ad5f1bb14 BUGFIX: Ensure diff arrays are one-dimensional 2020-03-17 15:57:28 +13:00
Serge Latyntcev 559f660e0e Merge branch '4.4' into 4 2019-11-13 15:40:34 +13:00
Michal Kleiner 4f614423ad Ensure Requirements_Backend respects explicit false for async/defer 2019-10-30 09:59:57 +13:00
Robbie Averill 4d5d7a34a1 NEW Add FilterInterface and retrofit into URLSegmentFilter
There are other filters in the core SilverStripe product, e.g. FileNameFilter in silverstripe/assets
which would benefit from having a common filter interface. This retrofits one for URLSegmentFilter
in framework. I have not added any PHP 7 syntax in method signatures to avoid breaking backwards
compatibility.
2019-10-04 10:51:24 +13:00
Aaron Carlino b002ef1171 Merge branch '4.4' into 4 2019-09-24 17:26:50 +12:00
Garion Herman 0d27f32cc9 FIX Add 'legal empty attributes' to allow empty alt values on imgs
In some situations, a caption is used in place of a value in the alt
attribute, and in others an image may be cosmetic and not in need of an
alt attribute value (though the alt attribute must still be rendered in
this case).
2019-09-24 11:44:12 +12:00
Robbie Averill aa6b244db9 Merge branch '4.4' into 4 2019-09-13 18:11:46 -07:00
Robbie Averill 592ab6abc1 Merge branch '4.3' into 4.4 2019-09-13 18:11:34 -07:00
Robbie Averill 066ce8e01c Merge branch '4.2' into 4.3
# Conflicts:
 #	src/View/ThemeResourceLoader.php
2019-09-13 18:10:37 -07:00
Loz Calver 759601741d NEW: Use templates to render embed shortcodes (closes #8762) 2019-08-21 09:32:16 +01:00
Chee Wai cb91f5fa06 NEW Added SRI support for Requirements::css, Requirements::javascript (#9139) 2019-07-21 09:51:22 +02:00
Loz Calver b1551a687d Catch Path::join() exceptions in findTemplate() (fixes #9084) 2019-06-21 09:40:18 +01:00
Guy Marriott bb5b610636
Merge branch '4.4' into 4 2019-06-17 08:58:50 +12:00
3Dgoo 7e12bee86a
Requirements_Backend.php API documentation fix
The API documentation for Requirements_Backend is currently broken:
https://api.silverstripe.org/4/SilverStripe/View/Requirements_Backend.html#method_customScript

This is because there are unescaped start tags in the function documentation. 

This is the same as the recent #9060 PR, but for the Requirements_Backend class this time.

This fix changes the tags to be escaped.
2019-06-15 10:37:49 +09:30
3Dgoo 8dcfa53109
Requirements.php API documentation fix
The API documentation for Requirements is currently broken:
https://api.silverstripe.org/4/SilverStripe/View/Requirements.html#method_customScript

This is because there are unescaped start tags in the function documentation. 

This fix changes the tags to be escaped.
2019-06-13 09:21:12 +09:30
Jarkko Linnanvirta 9184056b5e URLSegmentFilter: Remove : characters from url segments when multibyte characters are allowed. 2019-06-02 11:43:51 +03:00
Robbie Averill 3e90fdf42f Merge branch '4.3' into 4 2019-02-19 08:41:05 +07:00
Robbie Averill ed74549c4f Merge branch '4.2' into 4.3 2019-02-19 08:39:59 +07:00
Robbie Averill 79e44b42fa Merge branch '4.1' into 4.2 2019-02-19 08:37:07 +07:00
Robbie Averill cb7f15a681 Merge branch '4.0' into 4.1 2019-02-19 08:36:41 +07:00
mikeyc7m 0491ca03cf FIX prevent death on urls with querystrings & anchors 2019-01-29 13:15:14 +02:00
Maxime Rainville a589bcb092
Merge pull request #8729 from emteknetnz/bugfix/htmlvalue-getcontent
Ensure document is not falsey before attempting to clone it
2019-01-29 09:11:04 +13:00
Loz Calver 785e9f123f Replace self:: with static:: for shortcode methods 2019-01-28 14:51:34 +00:00
Steve Boyd 7ea218aa1c Ensure document is not falsey before attempting to clone it 2019-01-16 16:24:45 +13:00
Maxime Rainville 13486ca80e MINOR Add unit test for Requirements::add_i18n_javascript() 2019-01-16 10:36:53 +13:00
Maxime Rainville c6214b855f MINOR Update add_i18n_javascript to load lowercase-dash language files 2019-01-15 15:04:39 +13:00
Aaron Carlino 7d201309ad Merge branch '4.2' into 4 2018-10-15 13:42:55 +13:00
Robbie Averill c4788803ee FIX Remove unused cacheData prop from #8451 2018-10-08 12:05:29 +02:00
Robbie Averill 024762f03b Move default themes lookup before cache check 2018-10-05 15:00:32 +02:00
Robbie Averill da9301f241 Use SilverStripe cache API instead of memory cache, add tests and fix cache config indentation 2018-10-05 14:58:48 +02:00
Robbie Averill 172d8915b7 Clear cache between ThemeResourceLoader tests 2018-10-05 14:12:26 +02:00
Robbie Averill 9ea7b58a8f NEW Add memory cache to ThemeResourceLoader::findTemplate()
For large sites, this reduces the number of file_exists, Path::join, getThemePaths etc
calls and can contribute to 26% reduction in TTFB load time
2018-10-05 14:12:26 +02:00
Harsh Chokshi 60dd5f288b Implement __isset for ViewableData_Customised
Resolves #8302.
2018-10-01 09:40:12 +13:00
Robbie Averill 4d14e9b6b1
Merge pull request #8421 from creative-commoners/pulls/4.3/psr-5-deprecations
Update deprecation PHPDocs to be PSR-5 compliant
2018-09-28 14:18:54 +02:00
Robbie Averill f842ee2eec Update deprecation PHPDocs to be PSR-5 compliant
See: https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc-tags.md#55-deprecated
2018-09-28 10:49:14 +02:00
Robbie Averill 594fa30b82 Remove redundant elseif complexity and switch to short array syntax 2018-09-27 17:29:52 +02:00
Daniel Hensby bd2abc7a12
Merge branch '4.1' into 4.2 2018-07-13 16:44:23 +01:00
Robbie Averill 7d90a14f37 NEW Shift Embeddable and EmbedResource from asset-admin, lazy load Embed to allow injected dependencies (#8194) 2018-06-20 11:40:28 +12:00
Robbie Averill 725212a707 FIX Allow dispatcher in Embed to be configured with injector (#8192) 2018-06-20 11:37:35 +12:00
Damian Mooyman 77a45c0dbc
Merge remote-tracking branch 'origin/4.1' into 4
# Conflicts:
#	src/Forms/HTMLEditor/HTMLEditorSanitiser.php
#	src/ORM/DataObjectSchema.php
#	src/ORM/Queries/SQLSelect.php
#	src/View/Parsers/ShortcodeParser.php
2018-06-11 10:19:04 +12:00
Robbie Averill d842225df6 FIX Codesniffer style violations with comments 2018-06-11 09:55:18 +12:00
Daniel Hensby e260319823
Merge branch '4.0' into 4.1 2018-06-08 23:05:24 +01:00
Damian Mooyman 29f9b1c18f
Fix linting issues 2018-06-08 11:38:36 +12:00
Robbie Averill ea16e28aa7 Merge branch '4.1' into 4 2018-05-28 18:33:56 +12:00
Robbie Averill 722202fef4 Merge remote-tracking branch 'origin/4.0.4' into 4.1.1
# Conflicts:
  #	src/Control/Director.php
2018-05-24 15:41:11 +12:00
Damian Mooyman 2e13ae746f [ss-2018-006] Prevent code execution in template value resolution 2018-05-14 17:05:31 +12:00
Andrew Aitken-Fincham de0b76dff6 ENHANCEMENT Fall back to SSViewer::get_themes when using themeResourceLoaders 2018-02-16 09:09:35 +13:00
Damian Mooyman e359948eb3
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Core/CoreKernel.php
2018-02-05 17:52:38 +13:00
Daniel Hensby 212178bb0d
FIX `SSViwer::execute_template` should allow requirements to be included 2018-01-31 11:10:26 +00:00
Robbie Averill 3d7ecc5240 FIX Allow cleanup marker regex to handle self closing HTML5 tags 2018-01-30 11:16:21 +13:00
Damian Mooyman a3c52f901a
Merge remote-tracking branch 'origin/4.0' into 4
# Conflicts:
#	src/Core/TempFolder.php
#	src/ORM/DataObject.php
#	src/View/ThemeResourceLoader.php
#	src/includes/constants.php
#	tests/php/Control/SimpleResourceURLGeneratorTest.php
#	tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php
#	tests/php/View/RequirementsTest.php
2018-01-22 14:57:05 +13:00
Daniel Hensby db610aaf3b
Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
Damian Mooyman 8d077203d4 API Implement support for public/ webroot folder (#7741)
* API Implement support for public/ webroot folder

* Bugfixes and refactor based on feedback
2018-01-12 16:25:02 +13:00
Damian Mooyman d9d1e13735
Merge pull request #7707 from gorriecoe/Requirements-javascriptTemplate-ModuleResourceLoader
FIX: Added ModuleResourceLoader to javascriptTemplate
2017-12-18 14:27:32 +13:00
Robbie Averill ea8ed5067d FIX Allow Requirements::block to handle module resource paths 2017-12-17 16:09:22 +13:00
Gorrie Coe ef74911922 Added ModuleResourceLoader to javascriptTemplate 2017-12-15 11:20:20 +13:00
Loz Calver 259ae3f78b NEW: Add ViewableData::getViewerTemplates()
Forms part of the fix for silverstripe/silverstripe-cms#2039
2017-12-05 09:13:28 +00:00
Damian Mooyman 6e7fb4747e
Restore legacy $ThemeDir support 2017-11-27 15:24:40 +13:00
Chris Joe bee3c404fa
Merge pull request #7545 from open-sausages/pulls/4.0/deprecated-each
BUG Remove usage of deprecated each() and use a helper method instead
2017-11-15 16:30:20 +13:00
Damian Mooyman 5bc4f3d1fc
BUG Remove usage of deprecated each() and use a helper method instead 2017-11-01 16:04:35 +13:00
Damian Mooyman 9d3277f3d3
BUG Fix forceWWW and forceSSL not working in _config.php
API Introduce CanonicalURLMiddleware
BUG Fix Director::makeRelative() failing on multi-domain sites
2017-10-30 14:42:36 +13:00
Christopher Joe dabdc905ce
BUG Fix enable email subclasses to use their respective templates 2017-10-19 14:44:04 +13:00
Damian Mooyman 6a55dcfc16
Fix references to resource paths / urls 2017-10-10 16:51:47 +13:00
Christopher Joe 3560a0418d rename TEMP_FOLDER to TEMP_PATH 2017-10-09 12:41:34 +13:00
Damian Mooyman f64c95b33c
Add new ModuleResourceLoader helper 2017-10-03 12:20:49 +13:00
Damian Mooyman fa57deeba4
ENHANCEMENT Allow vendor modules with url rewriting
API Introduce ModuleResource feature
2017-09-29 10:28:38 +13:00
Damian Mooyman f574f6d1b2
Reset test state for modified config options 2017-09-28 17:24:32 +13:00
Christopher Joe 90d0361a6c Enhancement update set_themes to not update config 2017-09-28 16:47:13 +13:00
Christopher Joe 7e92b053f4 Enhancement Add setter and getter for certain classes, so that LeftAndMain no longer updates config during init 2017-09-28 16:47:13 +13:00
Loz Calver 1dd0c04891 Tidy up + document SSViewer classes 2017-09-21 17:03:21 +01:00
Damian Mooyman f1a12e15be
BUG Fix sub-template lookup for includes 2017-09-20 18:04:01 +12:00
Andrew Aitken-Fincham 6613826ed8 FIX SSViewer::add_themes() to properly prepend 2017-09-12 13:34:56 +01:00
Robbie Averill f8372ef6dc MINOR Add default value to ArrayData constructor 2017-09-05 09:42:52 +12:00
Damian Mooyman 98c10b089c
ENHANCEMENT Allow <% include %> to fallback outside of the Includes folder
Fixes #7108
2017-08-29 16:15:46 +12:00
Christopher Joe e4b506cbe7
Fix add combinedFiles to clear logic 2017-08-29 13:52:14 +12:00
Damian Mooyman 9b4d689bb2 Lazy-load custom methods and extensions on CustomMethods and Extensible traits
No longer need constructExtensions()
2017-08-22 15:47:24 +12:00
Robbie Averill 823e49526f NEW Allow SSViewer and SSViewer_FromString to be injectable 2017-07-13 20:48:58 +12:00
Aaron Carlino 2b266276c2 API Implement new module sorting pattern 2017-07-13 10:27:27 +12:00
Aaron Carlino c836a2e2d2 BUGFIX: Module resource regex does not allow ports 2017-07-05 13:26:30 +12:00
Aaron Carlino ad9d4e6820 Pulls/4.0/shortcode namespacing (#7085)
* New shortcode providers, update config, docs

* Use new ImageShortcodeProvider

* Move tests

* New shortcodes namespace

* Move file and image shortcode registrations from framework to assets
2017-06-29 18:45:17 +12:00
Sam Minnee 741166e369 API: ModulePath template global now takes any composer package name.
NEW: URL generation now handled by pluggable ResourceURLGenerator service.
NEW: Requirements::javascript() and Requirements::css() now support “vendor/package:resource” syntax.

These changes will make it easier to us to fully abstract:
 - file access from module location
 - file location from URL generation

API: ModulePath template global now takes any composer package name.
NEW: URL generation now handled by pluggable ResourceURLGenerator service.
NEW: Requirements::javascript() and Requirements::css() now support “vendor/package:resource” syntax.

These changes will make it easier to us to fully abstract:
 - file access from module location
 - file location from URL generation
2017-06-28 16:59:28 +12:00
Damian Mooyman 3873e4ba00 API Refactor bootstrap, request handling
See https://github.com/silverstripe/silverstripe-framework/pull/7037
and https://github.com/silverstripe/silverstripe-framework/issues/6681

Squashed commit of the following:

commit 8f65e56532
Author: Ingo Schommer <me@chillu.com>
Date:   Thu Jun 22 22:25:50 2017 +1200

    Fixed upgrade guide spelling

commit 76f95944fa
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 16:38:34 2017 +1200

    BUG Fix non-test class manifest including sapphiretest / functionaltest

commit 9379834cb4
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 15:50:47 2017 +1200

    BUG Fix nesting bug in Kernel

commit 188ce35d82
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 15:14:51 2017 +1200

    BUG fix db bootstrapping issues

commit 7ed4660e7a
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 14:49:07 2017 +1200

    BUG Fix issue in DetailedErrorFormatter

commit 738f50c497
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 11:49:19 2017 +1200

    Upgrading notes on mysite/_config.php

commit 6279d28e5e
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 11:43:28 2017 +1200

    Update developer documentation

commit 5c90d53a84
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 22 10:48:44 2017 +1200

    Update installer to not use global databaseConfig

commit f9b2ba4755
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 21:04:39 2017 +1200

    Fix behat issues

commit 5b59a912b6
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 17:07:11 2017 +1200

    Move HTTPApplication to SilverStripe\Control namespace

commit e2c4a18f63
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 16:29:03 2017 +1200

    More documentation
    Fix up remaining tests
    Refactor temp DB into TempDatabase class so it’s available outside of unit tests.

commit 5d235e64f3
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 21 12:13:15 2017 +1200

    API HTTPRequestBuilder::createFromEnvironment() now cleans up live globals
    BUG Fix issue with SSViewer
    Fix Security / View tests

commit d88d4ed4e4
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 16:39:43 2017 +1200

    API Refactor AppKernel into CoreKernel

commit f7946aec33
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 16:00:40 2017 +1200

    Docs and minor cleanup

commit 12bd31f936
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 20 15:34:34 2017 +1200

    API Remove OutputMiddleware
    API Move environment / global / ini management into Environment class
    API Move getTempFolder into TempFolder class
    API Implement HTTPRequestBuilder / CLIRequestBuilder
    BUG Restore SS_ALLOWED_HOSTS check in original location
    API CoreKernel now requires $basePath to be passed in
    API Refactor installer.php to use application to bootstrap
    API move memstring conversion globals to Convert
    BUG Fix error in CoreKernel nesting not un-nesting itself properly.

commit bba9791146
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 18:07:53 2017 +1200

    API Create HTTPMiddleware and standardise middleware for request handling

commit 2a10c2397b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 17:42:42 2017 +1200

    Fixed ORM tests

commit d75a8d1d93
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 17:15:07 2017 +1200

    FIx i18n tests

commit 06364af3c3
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 16:59:34 2017 +1200

    Fix controller namespace
    Move states to sub namespace

commit 2a278e2953
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 19 12:49:45 2017 +1200

    Fix forms namespace

commit b65c21241b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 15 18:56:48 2017 +1200

    Update API usages

commit d1d4375c95
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Thu Jun 15 18:41:44 2017 +1200

    API Refactor $flush into HTPPApplication
    API Enforce health check in Controller::pushCurrent()
    API Better global backup / restore
    Updated Director::test() to use new API

commit b220534f06
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 22:05:57 2017 +1200

    Move app nesting to a test state helper

commit 603704165c
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 21:46:04 2017 +1200

    Restore kernel stack to fix multi-level nesting

commit 2f6336a15b
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 17:23:21 2017 +1200

    API Implement kernel nesting

commit fc7188da7d
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:43:13 2017 +1200

    Fix core tests

commit a0ae723514
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:23:52 2017 +1200

    Fix manifest tests

commit ca03395251
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 15:00:00 2017 +1200

    API Move extension management into test state

commit c66d433977
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Tue Jun 13 14:10:59 2017 +1200

    API Refactor SapphireTest state management into SapphireTestState
    API Remove Injector::unregisterAllObjects()
    API Remove FakeController

commit f26ae75c6e
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 12 18:04:34 2017 +1200

    Implement basic CLI application object

commit 001d559662
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Mon Jun 12 17:39:38 2017 +1200

    Remove references to SapphireTest::is_running_test()
    Upgrade various code

commit de079c041d
Author: Damian Mooyman <damian@silverstripe.com>
Date:   Wed Jun 7 18:07:33 2017 +1200

    API Implement APP object
    API Refactor of Session
2017-06-22 22:50:45 +12:00
Damian Mooyman 64e802f795
API Move createTag to HTML class
ENHANCEMENT Better HTML generation behaviour for Requirements_Backend
2017-06-16 12:22:05 +12:00
Simon Erkelens 082db89550 Feedback from Damian.
- Move the success and message to a validationresult
- Fix tests for validationresult return
- We need to clear the session in Test logOut method
- Rename to MemberAuthenticator and CMSMemberAuthenticator for consistency.
- Unify all to getCurrentUser on Security
- ChangePasswordHandler removed from Security
- Update SapphireTest for CMS login/logout
- Get the Member ID correctly, if it's an object.
- Only enable "remember me" when it's allowed.
- Add flag to disable password logging
- Remove Subsites coupling, give it an extension hook to disable itself
- Change cascadeLogInTo to cascadeInTo for the logout method logic naming
- Docblocks
- Basicauth config
2017-06-08 17:50:20 +12:00
Sam Minnee e226b67d06 Refactoring of authenticators
Further down the line, I'm only returning the `Member` on the doLogin, so it's possible for the Handler or Extending Handler to move to a second step.
Also cleaned up some minor typos I ran in to. Nothing major.

This solution works and is manually tested for now. Supports multiple login forms that end up in the correct handler. I haven't gotten past the handler yet, as I've yet to refactor my Yubiauth implementation.

FIX: Corrections to the multi-login-form support.

Importantly, the system provide a URL-space for each handler, e.g.
“Security/login/default” and “Security/login/other”. This is much
cleaner than identifying the active authenticator by a get parameter,
and means that the tabbed interface is only needed on the very first view.

Note that you can test this without a module simply by loading the
default authenticator twice:

SilverStripe\Security\Security:
  authenticators:
    default: SilverStripe\Security\MemberAuthenticator\Authenticator
    other: SilverStripe\Security\MemberAuthenticator\Authenticator

FIX: Refactor delegateToHandler / delegateToHandlers to have less
duplicated code.
2017-06-07 21:11:52 +12:00