Skip to content
GitLab
Explore
Sign in
libre.sh
docker
RocketChat
Compare revisions
a77aa3cc39544e279471691cc57117ad125b8ea8 to b1fcd11876291f5dff08cf976bd0934c6acbf1b3
Commits on Source (4)
feat: v6.4.0
· ae3baabd
Hugo Renard
authored
Sep 28, 2023
ae3baabd
feat: bump to 6.4.4
· 215edf29
Hugo Renard
authored
Oct 30, 2023
215edf29
feat: bump to 6.4.5
· 4ccdee4d
Hugo Renard
authored
Nov 06, 2023
4ccdee4d
fix: add patch for firefox
· b1fcd118
Hugo Renard
authored
Nov 09, 2023
https://github.com/RocketChat/Rocket.Chat/pull/30750/files
b1fcd118
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
b1fcd118
variables
:
DOCKER_HUB_REPO
:
libresh/rocketchat
VERSION
:
6.
3.6
VERSION
:
6.
4.5
test
:
stage
:
test
...
...
Dockerfile
View file @
b1fcd118
...
...
@@ -21,6 +21,9 @@ RUN git apply no-upgrade.patch
COPY
test-scalability.patch test-scalability.patch
RUN
git apply test-scalability.patch
COPY
fix-oauth-login.patch fix-oauth-login.patch
RUN
git apply fix-oauth-login.patch
RUN
GENERATE_SOURCEMAP
=
false
TOOL_NODE_FLAGS
=
"--max_old_space_size=8192"
yarn build:ci
--
--directory
/build
...
...
fix-oauth-login.patch
0 → 100644
View file @
b1fcd118
diff --git a/apps/meteor/app/custom-oauth/client/custom_oauth_client.js b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
index a112777584..c516f115ae 100644
--- a/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
+++ b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
@@ -6,7 +6,6 @@
import { Meteor } from 'meteor/meteor';
import { OAuth } from 'meteor/oauth';
import { ServiceConfiguration } from 'meteor/service-configuration';
-import './swapSessionStorage';
import { isURL } from '../../../lib/utils/isURL';
// Request custom OAuth credentials for the user
diff --git a/apps/meteor/app/custom-oauth/client/swapSessionStorage.js b/apps/meteor/app/custom-oauth/client/swapSessionStorage.js
deleted file mode 100644
index 83d9331097..0000000000
--- a/apps/meteor/app/custom-oauth/client/swapSessionStorage.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import { Meteor } from 'meteor/meteor';
-import { OAuth } from 'meteor/oauth';
-import { Reload } from 'meteor/reload';
-
-// TODO: This is a nasty workaround and should be removed as soon as possible
-// Firefox is losing the sessionStorage data (v >= 79.0) after the redirect
-
-if (navigator.userAgent.indexOf('Firefox') !== -1) {
- const KEY_NAME = 'Swapped_Storage_Workaround';
-
- OAuth.saveDataForRedirect = (loginService, credentialToken) => {
- Meteor._localStorage.setItem(KEY_NAME, JSON.stringify({ loginService, credentialToken }));
- Reload._migrate(null, { immediateMigration: true });
- };
-
- OAuth.getDataAfterRedirect = () => {
- let migrationData = Meteor._localStorage.getItem(KEY_NAME);
- Meteor._localStorage.removeItem(KEY_NAME);
- try {
- migrationData = JSON.parse(migrationData);
- } catch (error) {
- migrationData = null;
- }
-
- if (!(migrationData && migrationData.credentialToken)) {
- return null;
- }
-
- const { credentialToken } = migrationData;
- const key = OAuth._storageTokenPrefix + credentialToken;
- let credentialSecret;
- try {
- credentialSecret = sessionStorage.getItem(key);
- sessionStorage.removeItem(key);
- } catch (e) {
- Meteor._debug('error retrieving credentialSecret', e);
- }
- return {
- loginService: migrationData.loginService,
- credentialToken,
- credentialSecret,
- };
- };
-}
no-upgrade.patch
View file @
b1fcd118
diff --git a/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx b/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
index 7
53baaf8e3..9750ba253c
100644
index 7
ecc7b8ab9..f81bd765a6
100644
--- a/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
+++ b/apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
@@ -5,8 +5,6 @@
import { useThemeMode } from '@rocket.chat/ui-theming/src/hooks/useThemeMode';
...
...
@@ -34,34 +34,92 @@ index d2e51f1913..3a9f924302 100644
return <GenericMenu sections={sections} title={t('Administration')} is={Sidebar.TopBar.Action} {...props} />;
};
diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationMenu.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationMenu.tsx
index f6179bb93d..5487afd639 100644
--- a/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationMenu.tsx
+++ b/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationMenu.tsx
@@ -45,7 +45,6 @@
export const useAdministrationMenu = () => {
diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationItems.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationItems.tsx
index 531545b20a..590a96f5e8 100644
--- a/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationItems.tsx
+++ b/apps/meteor/client/sidebar/header/actions/hooks/useAdministrationItems.tsx
@@ -9,13 +9,9 @@
import {
} from '@rocket.chat/ui-contexts';
import React from 'react';
-import type { UpgradeTabVariant } from '../../../../../lib/upgradeTab';
-import { getUpgradeTabLabel, isFullyFeature } from '../../../../../lib/upgradeTab';
-import Emoji from '../../../../components/Emoji';
import type { GenericMenuItemProps } from '../../../../components/GenericMenu/GenericMenuItem';
import { useRegistrationStatus } from '../../../../hooks/useRegistrationStatus';
import RegisterWorkspaceModal from '../../../../views/admin/cloud/modals/RegisterWorkspaceModal';
-import { useUpgradeTabParams } from '../../../../views/hooks/useUpgradeTabParams';
const ADMIN_PERMISSIONS = [
'view-statistics',
@@ -57,11 +53,6 @@
export const useAdministrationItems = (): GenericMenuItemProps[] => {
const shouldShowAdminMenu = useAtLeastOnePermission(ADMIN_PERMISSIONS);
- const { tabType, trialEndDate, isLoading } = useUpgradeTabParams();
- const shouldShowEmoji = isFullyFeature(tabType);
-
- const label = getUpgradeTabLabel(tabType);
-
const isAdmin = useRole('admin');
const setModal = useSetModal();
@@ -74,13 +65,10 @@
export const useAdministrationItems = (): GenericMenuItemProps[] => {
};
const adminRoute = useRoute('admin-index');
- const upgradeRoute = useRoute('upgrade');
const cloudRoute = useRoute('cloud');
const omnichannel = usePermission('view-livechat-manager');
- const showUpgradeItem = !isLoading && tabType;
-
const omnichannelItem: GenericMenuItemProps = {
id: 'omnichannel',
content: t('Omnichannel'),
@@ -88,18 +76,6 @@
export const useAdministrationItems = (): GenericMenuItemProps[] => {
onClick: () => router.navigate('/omnichannel/current'),
};
- const upgradeItem: GenericMenuItemProps = {
- id: 'showUpgradeItem',
- content: (
- <>
- {t(label)} {shouldShowEmoji && <Emoji emojiHandle=':zap:' />}
- </>
- ),
- icon: 'arrow-stack-up',
- onClick: () => {
- upgradeRoute.push({ type: tabType as UpgradeTabVariant }, trialEndDate ? { trialEndDate } : undefined);
- },
- };
const adminItem: GenericMenuItemProps = {
id: 'registration',
content: workspaceRegistered ? t('Registration') : t('Register'),
@@ -122,7 +98,6 @@
export const useAdministrationItems = (): GenericMenuItemProps[] => {
};
return [
- showUpgradeItem && upgradeItem,
shouldShowAdminMenu && workspaceItem,
isAdmin && adminItem,
omnichannel && omnichannelItem,
diff --git a/apps/meteor/client/sidebar/header/actions/hooks/useAppsItems.tsx b/apps/meteor/client/sidebar/header/actions/hooks/useAppsItems.tsx
index 3717f33fb1..64a284c269 100644
--- a/apps/meteor/client/sidebar/header/actions/hooks/useAppsItems.tsx
+++ b/apps/meteor/client/sidebar/header/actions/hooks/useAppsItems.tsx
@@ -18,9 +18,8 @@
export const useAppsItems = (): GenericMenuItemProps[] => {
const appBoxItems = useUserDropdownAppsActionButtons();
const hasAuditLicense = useHasLicenseModule('auditing') === true;
const hasManageAppsPermission = usePermission('manage-apps');
- const hasAccessMarketplacePermission = usePermission('access-marketplace');
const hasAdminPermission = useAtLeastOnePermission(ADMIN_PERMISSIONS);
const hasAuditPermission = usePermission('can-audit') && hasAuditLicense;
const hasAuditLogPermission = usePermission('can-audit-log') && hasAuditLicense;
@@ -56,13 +55,13 @@
export const useAdministrationMenu = () => {
const showAdmin = hasAdminPermission || !!adminBoxItems.length;
const showAudit = hasAuditPermission || hasAuditLogPermission;
const showWorkspace = hasAdminPermission;
- const showApps = hasAccessMarketplacePermission || hasManageAppsPermission || !!appBoxItems.length;
+ const showApps = hasManageAppsPermission || !!appBoxItems.length;
const administrationItems = useAdministrationItems({ accountBoxItems: adminBoxItems, showWorkspace });
const appItems = useAppsItems({
appBoxItems,
appsManagementAllowed: hasManageAppsPermission,
- showMarketplace: hasAccessMarketplacePermission || hasManageAppsPermission,
+ showMarketplace: hasManageAppsPermission,
});
const auditItems = useAuditItems({ showAudit: hasAuditPermission, showAuditLog: hasAuditLogPermission });
- const showMarketplace = hasAccessMarketplacePermission || hasManageAppsPermission;
+ const showMarketplace = hasManageAppsPermission;
const marketplaceRoute = useRoute('marketplace');
const page = 'list';
diff --git a/apps/meteor/client/views/admin/AdministrationRouter.tsx b/apps/meteor/client/views/admin/AdministrationRouter.tsx
index 93ea650d0d..3ad2a4d920 100644
--- a/apps/meteor/client/views/admin/AdministrationRouter.tsx
...
...
@@ -111,7 +169,7 @@ index 93ea650d0d..3ad2a4d920 100644
return (
diff --git a/apps/meteor/client/views/admin/sidebar/AdminSidebarPages.tsx b/apps/meteor/client/views/admin/sidebar/AdminSidebarPages.tsx
index
cc670f83f7..d4dbf976a5
100644
index
746301c73c..7fe8480322
100644
--- a/apps/meteor/client/views/admin/sidebar/AdminSidebarPages.tsx
+++ b/apps/meteor/client/views/admin/sidebar/AdminSidebarPages.tsx
@@ -4,9 +4,7 @@
import React, { memo } from 'react';
...
...
@@ -131,7 +189,7 @@ index cc670f83f7..d4dbf976a5 100644
- const { tabType, trialEndDate, isLoading } = useUpgradeTabParams();
-
return (
<Box display='flex' flexDirection='column' flexShrink={0} pb=
'x8'
>
<Box display='flex' flexDirection='column' flexShrink={0} pb=
{8}
>
- {!isLoading && tabType && <UpgradeTab type={tabType} currentPath={currentPath} trialEndDate={trialEndDate} />}
<SidebarItemsAssembler items={items} currentPath={currentPath} />
</Box>
...
...
test-scalability.patch
View file @
b1fcd118
...
...
@@ -13,7 +13,7 @@ index 8bccfed590..29a7129166 100644
try {
const hasLicense = await this.broker.call('license.hasLicense', ['scalability']);
diff --git a/apps/meteor/ee/server/local-services/instance/service.ts b/apps/meteor/ee/server/local-services/instance/service.ts
index
b8074d414f..e594f3c6a5
100644
index
0fc4fd33a9..fe2bd25fd8
100644
--- a/apps/meteor/ee/server/local-services/instance/service.ts
+++ b/apps/meteor/ee/server/local-services/instance/service.ts
@@ -51,11 +51,13 @@
export class InstanceService extends ServiceClassInternal implements IInstanceSe
...
...
@@ -45,10 +45,10 @@ index b8074d414f..e594f3c6a5 100644
}
diff --git a/ee/packages/omnichannel-services/src/OmnichannelTranscript.ts b/ee/packages/omnichannel-services/src/OmnichannelTranscript.ts
index
627e79066e..106c6ef74f
100644
index
802a6e15d0..43856dd462
100644
--- a/ee/packages/omnichannel-services/src/OmnichannelTranscript.ts
+++ b/ee/packages/omnichannel-services/src/OmnichannelTranscript.ts
@@ -
70
,6 +
70
,11 @@
export class OmnichannelTranscript extends ServiceClass implements IOmnichannelT
@@ -
69
,6 +
69
,11 @@
export class OmnichannelTranscript extends ServiceClass implements IOmnichannelT
// eslint-disable-next-line new-cap
this.log = new loggerClass('OmnichannelTranscript');
...
...
@@ -60,7 +60,7 @@ index 627e79066e..106c6ef74f 100644
this.onEvent('license.module', ({ module, valid }) => {
if (module === 'scalability') {
this.shouldWork = valid;
@@ -7
8
,6 +8
3
,9 @@
export class OmnichannelTranscript extends ServiceClass implements IOmnichannelT
@@ -7
7
,6 +8
2
,9 @@
export class OmnichannelTranscript extends ServiceClass implements IOmnichannelT
}
async started(): Promise<void> {
...
...
@@ -71,10 +71,10 @@ index 627e79066e..106c6ef74f 100644
this.shouldWork = await licenseService.hasLicense('scalability');
} catch (e: unknown) {
diff --git a/ee/packages/omnichannel-services/src/QueueWorker.ts b/ee/packages/omnichannel-services/src/QueueWorker.ts
index
89c66fbc33..258b75eebf
100644
index
141cb937f4..87938790f6
100644
--- a/ee/packages/omnichannel-services/src/QueueWorker.ts
+++ b/ee/packages/omnichannel-services/src/QueueWorker.ts
@@ -2
7
,6 +2
7
,9 @@
export class QueueWorker extends ServiceClass implements IQueueWorkerService {
@@ -2
6
,6 +2
6
,9 @@
export class QueueWorker extends ServiceClass implements IQueueWorkerService {
this.logger = new loggerClass('QueueWorker');
this.queue = new MessageQueue();
...
...
@@ -84,7 +84,7 @@ index 89c66fbc33..258b75eebf 100644
this.onEvent('license.module', ({ module, valid }) => {
if (module === 'scalability') {
this.shouldWork = valid;
@@ -3
5
,6 +3
8
,9 @@
export class QueueWorker extends ServiceClass implements IQueueWorkerService {
@@ -3
4
,6 +3
7
,9 @@
export class QueueWorker extends ServiceClass implements IQueueWorkerService {
}
async started(): Promise<void> {
...
...
@@ -95,7 +95,7 @@ index 89c66fbc33..258b75eebf 100644
this.shouldWork = await License.hasLicense('scalability');
} catch (e: unknown) {
diff --git a/ee/packages/presence/src/Presence.ts b/ee/packages/presence/src/Presence.ts
index
9bb29b011c..0278e4b5a6
100755
index
238cd445de..d4307d3474
100755
--- a/ee/packages/presence/src/Presence.ts
+++ b/ee/packages/presence/src/Presence.ts
@@ -39,6 +39,10 @@
export class Presence extends ServiceClass implements IPresence {
...
...
@@ -106,17 +106,16 @@ index 9bb29b011c..0278e4b5a6 100755
+ this.hasLicense = true;
+ return;
+ }
this.onEvent('license.module', ({ module, valid }) => {
this.onEvent('license.module',
async
({ module, valid }) => {
if (module === 'scalability') {
this.hasLicense = valid;
@@ -58,7 +62,9 @@
export class Presence extends ServiceClass implements IPresence {
}, 10000);
@@ -65,6 +69,9 @@
export class Presence extends ServiceClass implements IPresence {
try {
- this.hasLicense = await License.hasLicense('scalability');
+ if (process.env.TEST_SCALABILITY !== 'true') {
+ this.hasLicense = await License.hasLicense('scalability');
+ }
await Settings.updateValueById('Presence_broadcast_disabled', false);
+ if (process.env.TEST_SCALABILITY === 'true') {
+ return;
+ }
this.hasLicense = await License.hasLicense('scalability');
} catch (e: unknown) {
// ignore