Merge pull request #2045 from open-sausages/pulls/4.0/permission-impossible

ENHANCEMENT: Cache inherited permissions
This commit is contained in:
Damian Mooyman 2017-12-12 13:37:28 +13:00 committed by GitHub
commit 5d879e5b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 11 deletions

View File

@ -15,7 +15,7 @@ addons:
env:
global:
- TRAVIS_NODE_VERSION="6"
- COMPOSER_ROOT_VERSION="4.0.x-dev"
- COMPOSER_ROOT_VERSION="4.x-dev"
- DISPLAY=":99"
- XVFBARGS=":99 -ac -screen 0 1024x768x16"
- SS_BASE_URL="http://localhost:8080/"
@ -45,10 +45,10 @@ before_script:
# Install composer dependencies
- composer validate
- composer install --prefer-dist
- composer require --prefer-dist --no-update silverstripe/recipe-cms:1.0.x-dev
- composer require --prefer-dist --no-update silverstripe/recipe-cms:1.1.x-dev
- composer update
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi
- if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.1.x-dev --prefer-dist; fi
- if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.1.x-dev --prefer-dist; fi
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
# Install NPM dependencies

View File

@ -6,8 +6,13 @@ SilverStripe\Core\Injector\Injector:
class: SilverStripe\Security\InheritedPermissions
constructor:
BaseClass: SilverStripe\CMS\Model\SiteTree
CacheService: '%$Psr\SimpleCache\CacheInterface.InheritedPermissions'
properties:
DefaultPermissions: '%$SilverStripe\SiteConfig\SiteConfigPagePermissions'
GlobalEditPermissions:
- CMS_ACCESS_LeftAndMain
- CMS_ACCESS_CMSMain
SilverStripe\Security\InheritedPermissionFlusher:
properties:
Services:
- '%$SilverStripe\Security\PermissionChecker.sitetree'

View File

@ -19,13 +19,12 @@
}
],
"require": {
"composer/installers": "*",
"silverstripe/admin": "^1@dev",
"silverstripe/campaign-admin": "^1@dev",
"silverstripe/framework": "^4@dev",
"silverstripe/reports": "^4@dev",
"silverstripe/siteconfig": "^4@dev",
"silverstripe/versioned": "^1@dev",
"silverstripe/admin": "^1.1@dev",
"silverstripe/campaign-admin": "^1.1@dev",
"silverstripe/framework": "^4.1@dev",
"silverstripe/reports": "^4.1@dev",
"silverstripe/siteconfig": "^4.1@dev",
"silverstripe/versioned": "^1.1@dev",
"silverstripe/vendor-plugin": "^1.0"
},
"require-dev": {