-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into scoped-discussion-permission
- Loading branch information
Showing
353 changed files
with
7,401 additions
and
3,528 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Fixed an issue where broadcasted events were published twice within the same instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Changed the name of the administration Logs page to "Records", implemented a tab layout in this page and added a new tab called "Analytic reports" that shows the most recent result of the statistics endpoint. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Fixed message disappearing from room after erased even if "Show Deleted Status" is enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": minor | ||
--- | ||
|
||
New setting to automatically enable autotranslate when joining rooms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
"@rocket.chat/meteor": minor | ||
"@rocket.chat/core-typings": minor | ||
--- | ||
|
||
Added `push` statistic, containing three bits. Each bit represents a boolean: | ||
``` | ||
1 1 1 | ||
| | | | ||
| | +- push enabled = 0b1 = 1 | ||
| +--- push gateway enabled = 0b10 = 2 | ||
+----- push gateway changed = 0b100 = 4 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Search users using full name too on share message modal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
chore: Deprecate un-used meteor method for omnichannel analytics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@rocket.chat/core-typings': minor | ||
'@rocket.chat/rest-typings': minor | ||
'@rocket.chat/tools': minor | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
Added option to select between two script engine options for the integrations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
'@rocket.chat/license': minor | ||
'@rocket.chat/jwt': minor | ||
'@rocket.chat/omnichannel-services': minor | ||
'@rocket.chat/omnichannel-transcript': minor | ||
'@rocket.chat/authorization-service': minor | ||
'@rocket.chat/stream-hub-service': minor | ||
'@rocket.chat/presence-service': minor | ||
'@rocket.chat/account-service': minor | ||
'@rocket.chat/core-services': minor | ||
'@rocket.chat/model-typings': minor | ||
'@rocket.chat/core-typings': minor | ||
'@rocket.chat/rest-typings': minor | ||
'@rocket.chat/ddp-streamer': minor | ||
'@rocket.chat/queue-worker': minor | ||
'@rocket.chat/presence': minor | ||
'@rocket.chat/meteor': minor | ||
--- | ||
|
||
Implemented the License library, it is used to handle the functionality like expiration date, modules, limits, etc. | ||
Also added a version v3 of the license, which contains an extended list of features. | ||
v2 is still supported, since we convert it to v3 on the fly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Github vulnerabilities and jira board integration | ||
|
||
on: | ||
schedule: | ||
- cron: '0 1 * * *' | ||
|
||
jobs: | ||
IntegrateSecurityVulnerabilities: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Github vulnerabilities and jira board integration" | ||
uses: RocketChat/[email protected] | ||
env: | ||
JIRA_URL: https://rocketchat.atlassian.net/ | ||
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }} | ||
JIRA_EMAIL: [email protected] | ||
JIRA_PROJECT_ID: GJIT | ||
UID_CUSTOMFIELD_ID: customfield_10059 | ||
JIRA_COMPLETE_PHASE_ID: 31 | ||
JIRA_START_PHASE_ID: 11 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,11 @@ RUN set -x \ | |
&& npm install [email protected] \ | ||
&& mv node_modules/sharp npm/node_modules/sharp \ | ||
# End hack for sharp | ||
# Start hack for isolated-vm... | ||
&& rm -rf npm/node_modules/isolated-vm \ | ||
&& npm install [email protected] \ | ||
&& mv node_modules/isolated-vm npm/node_modules/isolated-vm \ | ||
# End hack for isolated-vm | ||
&& cd npm \ | ||
&& npm rebuild bcrypt --build-from-source \ | ||
&& npm cache clear --force \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import proxyquire from 'proxyquire'; | ||
import sinon from 'sinon'; | ||
|
||
const hasAllPermissionAsyncMock = sinon.stub(); | ||
const getCachedSupportedVersionsTokenMock = sinon.stub(); | ||
|
||
const { getServerInfo } = proxyquire.noCallThru().load('./getServerInfo', { | ||
'../../../utils/rocketchat.info': { | ||
Info: { | ||
version: '3.0.1', | ||
}, | ||
}, | ||
'../../../authorization/server/functions/hasPermission': { | ||
hasPermissionAsync: hasAllPermissionAsyncMock, | ||
}, | ||
'../../../cloud/server/functions/supportedVersionsToken/supportedVersionsToken': { | ||
getCachedSupportedVersionsToken: getCachedSupportedVersionsTokenMock, | ||
}, | ||
'../../../settings/server': { | ||
settings: new Map(), | ||
}, | ||
}); | ||
describe('#getServerInfo()', () => { | ||
beforeEach(() => { | ||
hasAllPermissionAsyncMock.reset(); | ||
getCachedSupportedVersionsTokenMock.reset(); | ||
}); | ||
|
||
it('should return only the version (without the patch info) when the user is not present', async () => { | ||
expect(await getServerInfo(undefined)).to.be.eql({ version: '3.0' }); | ||
}); | ||
|
||
it('should return only the version (without the patch info) when the user present but they dont have permission', async () => { | ||
hasAllPermissionAsyncMock.resolves(false); | ||
expect(await getServerInfo('userId')).to.be.eql({ version: '3.0' }); | ||
}); | ||
|
||
it('should return the info object + the supportedVersions from the cloud when the request to the cloud was a success', async () => { | ||
const signedJwt = 'signedJwt'; | ||
hasAllPermissionAsyncMock.resolves(true); | ||
getCachedSupportedVersionsTokenMock.resolves(signedJwt); | ||
expect(await getServerInfo('userId')).to.be.eql({ info: { version: '3.0.1', supportedVersions: signedJwt } }); | ||
}); | ||
|
||
it('should return the info object ONLY from the cloud when the request to the cloud was NOT a success', async () => { | ||
hasAllPermissionAsyncMock.resolves(true); | ||
getCachedSupportedVersionsTokenMock.rejects(); | ||
expect(await getServerInfo('userId')).to.be.eql({ info: { version: '3.0.1' } }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; | ||
import { Info } from '../../../utils/rocketchat.info'; | ||
import { | ||
getCachedSupportedVersionsToken, | ||
wrapPromise, | ||
} from '../../../cloud/server/functions/supportedVersionsToken/supportedVersionsToken'; | ||
import { Info, minimumClientVersions } from '../../../utils/rocketchat.info'; | ||
|
||
type ServerInfo = | ||
| { | ||
info: typeof Info; | ||
} | ||
| { | ||
version: string | undefined; | ||
}; | ||
type ServerInfo = { | ||
info?: typeof Info; | ||
supportedVersions?: { signed: string }; | ||
minimumClientVersions: typeof minimumClientVersions; | ||
version: string; | ||
}; | ||
|
||
const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1'); | ||
|
||
export async function getServerInfo(userId?: string): Promise<ServerInfo> { | ||
if (userId && (await hasPermissionAsync(userId, 'get-server-info'))) { | ||
return { | ||
info: Info, | ||
}; | ||
} | ||
const hasPermissionToViewStatistics = userId && (await hasPermissionAsync(userId, 'view-statistics')); | ||
const supportedVersionsToken = await wrapPromise(getCachedSupportedVersionsToken()); | ||
|
||
return { | ||
version: removePatchInfo(Info.version), | ||
|
||
...(hasPermissionToViewStatistics && { | ||
info: { | ||
...Info, | ||
}, | ||
version: Info.version, | ||
}), | ||
|
||
minimumClientVersions, | ||
...(supportedVersionsToken.success && | ||
supportedVersionsToken.result && { | ||
supportedVersions: { signed: supportedVersionsToken.result }, | ||
}), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.