diff --git a/CHANGELOG.md b/CHANGELOG.md index 1768eead63..0e9809fca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ HumHub Changelog - Fix #4636: Jplayer overflow on mobile stream - Fix #4591: Registration error text "You are already logged in!" not translatable - Fix #4630: Transfer default content of user approve/decline email to approve/decline form +- Fix #4650: `adminCanChangeUserProfileImages` option has not effect 1.7.0 (November 4, 2020) ------------------------ diff --git a/protected/humhub/modules/content/widgets/ContainerProfileHeader.php b/protected/humhub/modules/content/widgets/ContainerProfileHeader.php index 864301f8e1..7550bbb204 100644 --- a/protected/humhub/modules/content/widgets/ContainerProfileHeader.php +++ b/protected/humhub/modules/content/widgets/ContainerProfileHeader.php @@ -3,6 +3,7 @@ namespace humhub\modules\content\widgets; +use humhub\modules\user\controllers\ImageController; use Yii; use humhub\modules\content\components\ContentContainerActiveRecord; use humhub\modules\space\models\Space; @@ -91,8 +92,8 @@ class ContainerProfileHeader extends JsWidget $this->classPrefix = 'profile'; if(!Yii::$app->user->isGuest) { - $canEditAsAdmin = (Yii::$app->user->isAdmin() && Yii::$app->getModule('user')->adminCanChangeUserProfileImages); - $this->canEdit = Yii::$app->user->identity->is($this->container) || $canEditAsAdmin; + /** @TODO move this out of ImageController layer... */ + $this->canEdit = ImageController::canEditProfileImage($this->container); } } diff --git a/protected/humhub/modules/content/widgets/views/containerProfileHeader.php b/protected/humhub/modules/content/widgets/views/containerProfileHeader.php index f7b980cadb..3adf4a3248 100644 --- a/protected/humhub/modules/content/widgets/views/containerProfileHeader.php +++ b/protected/humhub/modules/content/widgets/views/containerProfileHeader.php @@ -70,11 +70,11 @@ $profileImageUpload = Upload::withName($imageUploadName, ['url' => $imageUploadU