diff --git a/lib/Util.php b/lib/Util.php index 81fa01f2d2c1995f5a2bbc39374fb9ad9f40cf66..bf176a12f37900cb035f06ce0ce4704b7b585009 100755 --- a/lib/Util.php +++ b/lib/Util.php @@ -96,7 +96,8 @@ class Util { $office_entries = $this->getOnlyOfficeEntries(); $entries = array_merge($entries, $office_entries); } - + $betaGroupName = $this->config->getSystemValue("beta_group_name"); + $isBeta = $this->isBetaUser(); foreach ($entries as &$entry) { if (strpos($entry["id"], "external_index") !== 0) { $entry["style"] = ""; @@ -107,6 +108,11 @@ class Util { } $entry["iconOffsetY"] = 0; + $entry["is_beta"] = 0; + $appEnabledGroups = $this->config->getAppValue($entry['id'], 'enabled', 'no'); + if ($isBeta && str_contains($appEnabledGroups, $betaGroupName)) { + $entry["is_beta"] = 1; + } $entriesByHref[$entry["href"]] = $entry; } /* @@ -126,6 +132,9 @@ class Util { unset($entriesByHref['/apps/dashboard/']); unset($entriesByHref['/apps/ecloud-dashboard/']); unset($entriesByHref['']); + if ($isBeta && array_key_exists("/apps/snappymail/", $entriesByHref)) { + unset($entriesByHref['/apps/rainloop/']); + } $entries = array_values($entriesByHref); return array( 'apps' => $entries ); @@ -144,4 +153,10 @@ class Util { } return $this->groupManager->getUserGroupIds($user); } + + private function isBetaUser() { + $uid = $this->userSession->getUser()->getUID(); + $betaGroupName = $this->config->getSystemValue("beta_group_name"); + return $this->groupManager->isInGroup($uid, $betaGroupName); + } } diff --git a/src/components/AllApps.vue b/src/components/AllApps.vue index b46a7e5c41ceb0cd2015c5180d947588a3adac87..cfd86c787e40c9dd4ed6a2a657dc46f211c27fe3 100755 --- a/src/components/AllApps.vue +++ b/src/components/AllApps.vue @@ -40,6 +40,7 @@ @@ -51,6 +52,7 @@ @@ -305,4 +307,19 @@ export default { width:30%; height: 1.2em; } +a.item.beta-app { + position: relative; +} +.beta-app:after { + content: "BETA"; + position: absolute; + top: 15%; + background-color: #007fff; + color: white; + font-size: 12px; + border-radius: 10px; + line-height: normal; + padding: 2px 10px; + font-weight: 800; +}