Robbie Averill
6af985420f
FIX CMS permission checks for subsite are now handled in the state context
...
We now check the subsite state for the context and validate it against the current member's
group permissions using the SilverStripe ORM relationships instead of using SQL queries.
More granular permission checks e.g. canView etc are still up to data models to define and
handle.
2018-08-24 16:58:36 +12:00
Guy Marriott
039a7a8c84
Merge pull request #387 from creative-commoners/pulls/2.1/fix-cross-subsite-duplication
...
FIX Pages now correctly duplicate children across subsites
2018-08-24 11:03:56 +12:00
Robbie Averill
7f28c32427
FIX Pages now correctly duplicate children across subsites
2018-08-24 10:12:05 +12:00
Robbie Averill
87485e39f4
Loosen test assertion on content type for application/json
...
See https://github.com/silverstripe/silverstripe-framework/issues/5594
This was changed in Silverstripe 4.3
2018-08-20 09:19:54 +12:00
Robbie Averill
191c63bd9b
Remove extra subsite fixture definition
2018-07-13 16:31:10 +12:00
Robbie Averill
f635aa9811
Add subsite switching behat tests and a test that shows a UI bug in publishing
2018-07-13 15:59:37 +12:00
Robbie Averill
adc0395c25
Automated linting
2018-05-04 13:57:25 +12:00
Robbie Averill
cc064c43ce
Merge branch '1'
2018-05-04 13:56:26 +12:00
Robbie Averill
b4943fb77c
FIX Automatically create default SiteTree records for new subsites
2018-04-20 17:14:06 +12:00
Daniel Hensby
67bb7e0028
FIX Versioned regressions
2018-03-26 13:51:20 +01:00
Robbie Averill
2f7dc7a7a8
Clear hints cache for SS 4.1 only if method exists (SS 4.0 support)
2018-03-19 10:03:32 +13:00
Robbie Averill
30454dc04f
FIX Support blacklist for SS 4.0 and 4.1, remove old Translatable reference in test class
2018-03-15 17:15:19 +13:00
Robbie Averill
856496e09d
Ensure SiteTree class name hints cache gets cleared between tests
2018-03-15 17:03:41 +13:00
Robbie Averill
afd23be64c
FIX Correctly decode page type blacklist from JSON
2018-03-15 16:44:48 +13:00
Robbie Averill
8398a361cd
Use injected CMSMain to prevent unit test error missing dependencies
2018-03-15 15:56:10 +13:00
Raissa North
5404dafac1
FIX Fix unit tests for installations in which the base url is set
2018-02-01 14:26:12 +13:00
Raissa North
809b1d9b85
Fix switch statement syntax and replace deprecated doPublish() method.
2018-02-01 13:24:48 +13:00
Raissa North
8b5f593999
Fix line length
2018-02-01 13:19:02 +13:00
Raissa North
aa370f8df6
FIX Replace deprecated doPublish() method with publishRecursive()
2018-01-31 10:10:09 +13:00
Robbie Averill
17427fd251
Ignore host-map.php in phpcs, and ensure it is disabled in unit tests
2018-01-23 12:09:48 +13:00
Robbie Averill
6bbf988fda
API Convert most of Subsite public statics to config properties
2018-01-23 12:09:48 +13:00
Robbie Averill
4f174ffd6e
NEW Add test for FolderFormFactoryExtension with a separate fixture
2018-01-18 16:22:35 +13:00
Mike Cochrane
7301099241
Add missing use lines, fix some class names, remove unused use lines
2017-10-05 03:09:47 +00:00
Werner M. Krauß
e83435b2b6
update test for handling subsite specific themes
...
fixes #309
2017-09-13 06:13:55 +02:00
Robbie Averill
02a0895f4a
FIX Update visibility of test dataprovider and update doc block
2017-09-13 11:51:32 +12:00
prij
32385e580d
Excluded colon from domain field validation
2017-09-12 07:20:42 +12:00
Werner M. Krauß
774dee91d6
alternateAbsoluteLink() respects action parameter
...
fixes #275
2017-09-08 12:06:37 +01:00
Werner M. Krauß
2da5828e90
Sanitise filenames for error pages
...
fixes #299
2017-09-07 11:19:07 +02:00
Robbie Averill
19aeb8fd64
API Add getSubsiteIdWasChanged calculated dynamically
2017-09-05 13:48:28 +12:00
Robbie Averill
65f85faff6
FIX Catch database exceptions in middleware when DB is not ready, set session ID after delegation
2017-09-05 12:07:49 +12:00
Robbie Averill
1ac6e78bb3
FIX Remove session coupling, leave it to middleware. Use state instead.
2017-09-04 11:45:21 +12:00
Robbie Averill
b9582167c7
Mark SubsitesVirtualPage tests as incomplete, need to be fixed later
2017-08-31 14:17:47 +12:00
Robbie Averill
d934fbe08c
FIX Update behat tests and add configuration
2017-08-31 10:21:46 +12:00
Robbie Averill
1a9797c185
FIX Remove last use of static session methods, update some namespaces and assertion fixes
2017-08-31 09:44:09 +12:00
Robbie Averill
b0087b9035
FIX Allow persisted subsite IDs to session from state, fix remaining unit tests
2017-08-30 15:29:13 +12:00
Robbie Averill
c155855100
FIX Update API changes in ErrorPage and typo in extension config class name
2017-08-30 12:14:11 +12:00
Robbie Averill
38031887a9
FIX Update alternateTreeTitle to updateTreeTitle
2017-08-30 11:54:42 +12:00
Robbie Averill
e129cafa94
NEW Add SubsiteState and initialisation middleware, replace Subsite::currentSubsiteID use
2017-08-30 11:47:11 +12:00
Robbie Averill
c081de1202
FIX Replace static assertions with instance calls
2017-08-29 17:43:29 +12:00
Robbie Averill
7ffaf61aeb
FIX Update tests API implementations, add missing fixture namespaces
2017-08-29 17:43:29 +12:00
Robbie Averill
8d8ee14cc2
FIX Run SS standard PHP linter, separate SiteTree test mock classes
2017-08-29 17:43:28 +12:00
Robbie Averill
9fdc1d6607
Update Travis configuration for PHP 5.6-7.1, add composer dependencies and codecov.io config
2017-08-29 17:43:14 +12:00
Garion Herman
9a289a2e17
Merge branch 'master' into fix-ss-4-master
2017-08-28 21:52:32 +12:00
Robbie Averill
a13bf10184
Merge remote-tracking branch 'origin/1'
2017-08-02 16:39:32 +12:00
Robbie Averill
03e52101bb
Revert "SS4 namespaces compatibility"
...
This reverts commit e8f5f58bb0
.
2017-08-02 15:51:37 +12:00
Werner M. Krauß
877f4f5f9d
Add Subsite theme as main theme; allow cascading of themes
2017-06-07 12:18:35 +02:00
Werner M. Krauß
a4a1ab6a78
formatting code
2017-06-01 15:57:53 +02:00
Werner M. Krauß
fea1684f5c
fixing code analysis: use static::assertContains
2017-06-01 15:44:32 +02:00
Werner M. Krauß
849c0061e8
fixing code analysis: phpunit: use assertInstanceOf
2017-06-01 15:32:46 +02:00
Werner M. Krauß
25754e1158
fixing code analysis: updating phpdoc
2017-06-01 15:32:45 +02:00
Werner M. Krauß
abe1ac9fe6
fixing code analysis: replacing deprecated methods
2017-06-01 15:32:38 +02:00
Werner M. Krauß
e7ad086641
fixing code analysis: safely use single quotes
2017-06-01 15:32:30 +02:00
Werner M. Krauß
76852594a8
fixing code analysis: public method and case mismatch
2017-06-01 15:31:30 +02:00
Werner M. Krauß
212e4797b0
marking some tests as skipped that need more refactoring
2017-05-31 06:41:45 +02:00
Werner M. Krauß
709cbfa2c8
fix SubsiteAdminTest
2017-05-30 21:21:15 +02:00
Werner M. Krauß
f348f5fa97
fix SiteConfigSubsites AugmentSQL: get the right table name to filter
2017-05-30 20:50:52 +02:00
Werner M. Krauß
997459caf3
Get some more tests working
...
Updating config and i18n calls
2017-05-30 20:50:22 +02:00
Werner M. Krauß
492f437589
fixing FileSubsitesTest
...
call extension directly in test, as Versioned now is also applied to File
and has this method
2017-05-30 15:15:54 +02:00
Werner M. Krauß
e2bdd5ca41
fixing tests: adjusting yml file, update Config::modify usage
2017-05-30 15:14:28 +02:00
Tim Kung
5d3af16aaf
- namespacing all classes
...
- moving all phpunit tests into tests/php
- moving all extensions from _config.php into config.yml and removing obsolete _config.php
- moving GridFieldSubsiteDetailForm_ItemRequest into own file
(cherry picked from commit ee02828)
2017-05-30 15:13:40 +02:00
Werner M. Krauß
b8f98323ae
merge #2
2017-05-30 11:14:51 +02:00
Werner M. Krauß
9862cf5ea6
merge ss4 fixes by cheddam
2017-05-29 13:42:42 +02:00
Werner M. Krauß
d1e829697f
adjusting test fixtures yml file
2017-05-24 15:40:58 +02:00
Werner M. Krauß
c5f507b3f9
reformat code and tests
2017-05-24 15:26:28 +02:00
Werner M. Krauß
2295501587
upgrade tests
2017-05-24 15:25:34 +02:00
Werner M. Krauß
ef602abe47
replace config::inst()->update() with config::modify->set()
2017-05-24 15:20:51 +02:00
Loz Calver
e8f5f58bb0
SS4 namespaces compatibility
2016-09-23 09:34:23 +01:00
Damian Mooyman
0e61dfc3f6
BUG Prevent translatable / subdirs interfering with test state
2016-08-23 12:36:12 +12:00
Will Rossiter
c8f6f4a588
NEW: Add IncludeChildren option for copying pages between subsites.
2016-07-18 16:41:38 +12:00
Ingo Schommer
871e2bcefd
Merge pull request #250 from open-sausages/pulls/fix-copy
...
BUG Fix copy to subsite breaking on sub-pages
2016-06-13 10:24:13 +12:00
Damian Mooyman
ff28ac1b1e
BUG Fix copy to subsite breaking on sub-pages
...
Fixes #192
Signed-off-by: Damian Mooyman <damian@silverstripe.com>
Signed-off-by: Ingo Schommer <ingo@silverstripe.com>
2016-06-13 10:23:33 +12:00
Damian Mooyman
98636f8f58
BUG Prevent SubsiteXHRController failing if there are no subsites available
...
Fixes #200
2016-05-27 15:55:27 +12:00
Damian Mooyman
a98958fdf9
BUG Fix issue with urlsegment being renamed in subsites
2016-05-23 15:29:01 +12:00
Damian Mooyman
ce90c2124b
API Add option to specify http / https on subsite domains
2015-11-24 18:03:49 +13:00
Damian Mooyman
a0ede56c0e
Reformat for psr-2
2015-11-23 16:53:45 +13:00
Damian Mooyman
0d7dc49d6b
API Rename mysiteconfig to subsiteconfig
...
API make ErrorPageSubsite 4.x compatible
BUG Fix incorrect yml
BUG Fix incorrect DataExtension::augmentSQL implementation
2015-11-20 17:04:23 +13:00
Damian Mooyman
bfc70f9b06
Fix subsites to use correct permissions
...
See http://www.silverstripe.org/software/download/security-releases/ss-2015-008-sitetree-creation-permission-vulnerability
Conflicts:
tests/SiteTreeSubsitesTest.php
2015-04-30 22:34:28 +12:00
Ingo Schommer
c18a0a266f
Adjusted tests to new SiteTree->canCreate() logic in 3.1.11+
...
Checks SiteConfig permissions by default now
2015-04-30 22:34:28 +12:00
Damian Mooyman
5b9af35566
Use 3.2 compatible API
2015-02-24 09:34:34 +13:00
Damian Mooyman
a97b0d33eb
BUG Fix incompatibility with framework 3.2
2014-08-26 11:42:50 +12:00
Mateusz Uzdowski
9cf7a1453f
BUG Fixes to link rewriting when previewing subsites.
...
* JS error with href-less links.
* All forms get injected hidden fields, even though the loop attempts to
check for only the ones that submit locally.
* Also check for action-less forms.
Requires
https://github.com/silverstripe/silverstripe-framework/pull/3000 to be
merged for the Framework.
https://github.com/silverstripe-labs/silverstripe-testsession/pull/11
2014-04-02 13:39:01 +13:00
Mateusz Uzdowski
58b926af25
BUG Refactor the access checks and initial subsite redirections.
...
Remove the special AJAX handling to simplify the code. Now redirection
will be forced on any request that changes the subsite to re-synchronise
with the frontend.
Introduce canAccess method, and add it to alternateAccessCheck to make
sure this subsite-specific chceck is also done in situations that are
not captured by onBeforeInit.
2013-12-04 17:34:27 +13:00
Mateusz Uzdowski
aacaee08cd
BUG Prevent session-interface mismatch.
...
Disables transparent subsite switch on AJAX requests.
Makes sure the subsite is appropriately set up when opening up the CMS
with a link to subsited object.
2013-11-08 11:37:10 +13:00
Ingo Schommer
5ff3b691d7
More globalisation
2013-10-30 13:44:06 +01:00
Ingo Schommer
c0e6d1ad38
Added unit test around "forbidden section" redirection
...
See https://github.com/silverstripe/silverstripe-subsites/pull/115
2013-10-23 01:50:55 +02:00
Mateusz Uzdowski
d85412adf7
Fix the test coverage for the subsite access changes.
2013-10-18 11:58:11 +13:00
spronkey
586d88562c
Added test case for subsites virtual page onAfterWrite issue, plus changed get_from_all_subsites method to immediately eval and return an ArrayList, instead of lazy eval DataList. Fixes #106
2013-09-12 14:23:42 +12:00
Ingo Schommer
b49c86bd0b
Require subsite title ( fixes #26 )
2013-07-10 16:28:08 +02:00
Ingo Schommer
0e9c3344ac
Removed disabled tests ( #29 )
...
They use all kinds of outdated APIs (in test system and CMS controllers),
and the function rename makes it unclear that they're actually disabled.
These kinds of tests should be performed through Behat anyway.
2013-07-10 15:55:16 +02:00
Frank Mullenger
7bf6e89320
BUGFIX: Session var for active subsite out of sync with current subsite. Refs silverstripe/silverstripe-subsites#93 .
2013-07-10 12:24:42 +02:00
Sean Harvey
f0de6f2d87
fixing test to check for all extended cache keys, not just the immediate
2013-05-07 15:11:11 +12:00
Sean Harvey
f39ee67c4a
Fixing test for postgres, make sure the array is indexed from 0
2013-05-06 23:25:20 +12:00
Sean Harvey
6e4f22deab
Fixing incorrect order of items in array for test
2013-05-06 23:12:59 +12:00
Sean Harvey
cf1a1cb6dd
Fixing test for PostgreSQL
2013-05-06 23:07:16 +12:00
Sean Harvey
ffaaed072f
Removing bits of test that broke because of removal of related pages
2013-05-01 17:01:56 +12:00
Sean Harvey
0247765563
API Removed related pages functionality, this is now a separate module
...
If you need this functionality still, please checkout
github.com/silverstripe-labs/silverstripe-subsites_relatedpages
2013-05-01 12:35:17 +12:00
Sean Harvey
6f9a1bf6fb
Testing initial state of disable_subsite_filter
2013-04-30 15:50:45 +12:00
Sean Harvey
411abed7b8
Removing tests related to MetaTitle, this field doesn't exist anymore
2013-04-30 15:42:36 +12:00
Sean Harvey
3848f90a5a
Removed use of deprecated Object::get_static()
2013-04-30 15:34:26 +12:00
Sean Harvey
c9d5627e9f
Updating test to use Config instead of static setting
2013-04-30 15:25:21 +12:00