diff --git a/protected/humhub/components/access/ControllerAccess.php b/protected/humhub/components/access/ControllerAccess.php index 91774893b8..48443f1b20 100644 --- a/protected/humhub/components/access/ControllerAccess.php +++ b/protected/humhub/components/access/ControllerAccess.php @@ -326,7 +326,7 @@ class ControllerAccess extends Object /** * @return bool makes sure the response type is json */ - public function validateJson() + public function validateJsonResponse() { Yii::$app->response->format = 'json'; return true; diff --git a/protected/humhub/components/behaviors/AccessControl.php b/protected/humhub/components/behaviors/AccessControl.php index 66a30b605b..1ab28f72f6 100644 --- a/protected/humhub/components/behaviors/AccessControl.php +++ b/protected/humhub/components/behaviors/AccessControl.php @@ -56,7 +56,7 @@ class AccessControl extends \yii\base\ActionFilter * * @var array */ - public $rules = []; + public $rules = null; /** * Action ids which are allowed when Guest Mode is enabled @@ -133,14 +133,19 @@ class AccessControl extends \yii\base\ActionFilter * * @return ControllerAccess */ - protected function getControllerAccess($rules = []) + protected function getControllerAccess($rules = null) { + if($rules === null) { + $rules = [['strict']]; + } + $instance = null; if(method_exists($this->owner, 'getAccess')) { $instance = $this->owner->getAccess(); } if(!$instance) { + // fixes legacy behavior settings compatibility issue with no rules given $instance = new ControllerAccess(); } diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index ca26099f21..0f1ecc7613 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -16,7 +16,7 @@ Important note for LDAP users: There is a new setting "ID Attribute" which shoul - Enh: Added possibility to sort groups in directory - Enh: Removed LDAP UserFilter/LoginFilter length restriction - Fix: UTC timezone issue with `TimeZoneDropdownAddition` and added `$includeUTC` flag to `TimezoneHelper::generateList()` - +- Fix: ControllerAccess json rule 1.2.2 (August 2, 2017) --------------------------------