mirror of
https://github.com/humhub/humhub.git
synced 2025-04-21 07:31:53 +02:00
Module permissions are shown without reason (#7451)
* Module permissions are shown without reason * Module permissions are shown without reason --------- Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
parent
dae937387c
commit
8d93280ae4
@ -7,6 +7,7 @@ HumHub Changelog
|
||||
- Enh #7425: Installer Wording update due to `.env` configuration
|
||||
- Enh #7433: Use strikethrough style for disabled user name
|
||||
- Enh #7444: Rename Mailer settings keys to work with `.env`
|
||||
- Fix #7451: Fix Module permissions visibility in content containers when not enabled
|
||||
- Fix #7450: Fix stream load suppressed when previous content is deleted/archived
|
||||
|
||||
1.17.1 (Unreleased)
|
||||
|
@ -465,11 +465,17 @@ class PermissionManager extends Component
|
||||
*/
|
||||
public function createPermissionArray($groupId, $returnOnlyChangeable = false)
|
||||
{
|
||||
|
||||
$permissions = [];
|
||||
foreach ($this->getPermissions() as $permission) {
|
||||
/** @var $permission BasePermission */
|
||||
if ($returnOnlyChangeable && !$permission->canChangeState($groupId)) {
|
||||
if (
|
||||
$returnOnlyChangeable && !$permission->canChangeState($groupId) ||
|
||||
(
|
||||
$this->contentContainer &&
|
||||
array_key_exists($permission->moduleId, $this->contentContainer->moduleManager->getInstallable())
|
||||
&& !$this->contentContainer->moduleManager->isEnabled($permission->moduleId)
|
||||
)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user