From b4cfc86a49046eeac57786357f01f99f6cef9aa8 Mon Sep 17 00:00:00 2001 From: buddh4 Date: Mon, 16 Jul 2018 19:00:48 +0200 Subject: [PATCH] Fix: Wrong permission check on force invite check --- protected/humhub/docs/CHANGELOG.md | 2 +- protected/humhub/modules/space/models/forms/InviteForm.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index 0a80a1fa28..c917d5f0fe 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -33,7 +33,7 @@ HumHub Change Log - Fix: Added user dn to ldap attributes on login - Enh: Added Twig template engine for usage in modules - Enh: Added id data attribute on contentcontainer links - +- Fix: Wrong permission check on force invite check 1.3.0-beta.1 (July 4, 2018) ---------------------------- diff --git a/protected/humhub/modules/space/models/forms/InviteForm.php b/protected/humhub/modules/space/models/forms/InviteForm.php index 696b13d610..e094ebdf7d 100644 --- a/protected/humhub/modules/space/models/forms/InviteForm.php +++ b/protected/humhub/modules/space/models/forms/InviteForm.php @@ -116,7 +116,7 @@ class InviteForm extends Model */ public function isQueuedJob() { - return ($this->withoutInvite || $this->allRegisteredUsers) && $this->space->can(ManageUsers::class); + return ($this->withoutInvite || $this->allRegisteredUsers) && Yii::$app->user->can(ManageUsers::class); } public function forceInvite() {