diff --git a/.docker/Dockerfile.rhel b/.docker/Dockerfile.rhel index 3c225ef80951..6bea75501c1c 100644 --- a/.docker/Dockerfile.rhel +++ b/.docker/Dockerfile.rhel @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7 -ENV RC_VERSION 1.3.0 +ENV RC_VERSION 1.3.1 MAINTAINER buildmaster@rocket.chat diff --git a/.github/history.json b/.github/history.json index b7ca1acf8b06..369d03f3975c 100644 --- a/.github/history.json +++ b/.github/history.json @@ -33460,6 +33460,109 @@ ] } ] + }, + "1.0.5": { + "node_version": "8.11.4", + "npm_version": "6.4.1", + "mongo_versions": [ + "3.2", + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "15141", + "title": "Fix custom auth", + "userLogin": "MarcosSpessatto", + "milestone": "1.3.1", + "contributors": [ + "MarcosSpessatto" + ] + } + ] + }, + "1.1.5": { + "node_version": "8.11.4", + "npm_version": "6.4.1", + "mongo_versions": [ + "3.2", + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "15141", + "title": "Fix custom auth", + "userLogin": "MarcosSpessatto", + "milestone": "1.3.1", + "contributors": [ + "MarcosSpessatto" + ] + } + ] + }, + "1.2.4": { + "node_version": "8.11.4", + "npm_version": "6.4.1", + "mongo_versions": [ + "3.2", + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "15141", + "title": "Fix custom auth", + "userLogin": "MarcosSpessatto", + "milestone": "1.3.1", + "contributors": [ + "MarcosSpessatto" + ] + } + ] + }, + "1.3.1": { + "node_version": "8.11.4", + "npm_version": "6.4.1", + "mongo_versions": [ + "3.2", + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "15141", + "title": "Fix custom auth", + "userLogin": "MarcosSpessatto", + "milestone": "1.3.1", + "contributors": [ + "MarcosSpessatto" + ] + }, + { + "pr": "15119", + "title": "[FIX] Custom emoji table scroll", + "userLogin": "ggazzo", + "milestone": "1.3.1", + "contributors": [ + "ggazzo" + ] + }, + { + "pr": "15114", + "title": "[FIX] Direct Message names not visible on Admin panel", + "userLogin": "ggazzo", + "milestone": "1.3.1", + "contributors": [ + "ggazzo", + "sampaiodiego" + ] + } + ] } } } \ No newline at end of file diff --git a/.travis/snap.sh b/.travis/snap.sh index 6b224c66c226..a3d692f673f9 100755 --- a/.travis/snap.sh +++ b/.travis/snap.sh @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then RC_VERSION=$TRAVIS_TAG else CHANNEL=edge - RC_VERSION=1.3.0 + RC_VERSION=1.3.1 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index c565383bd7b1..c1281fd07ba9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,30 @@ +# 1.3.1 +`2019-08-08 ยท 2 ๐Ÿ› ยท 2 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +### ๐Ÿ› Bug fixes + +- Custom emoji table scroll ([#15119](https://github.com/RocketChat/Rocket.Chat/pull/15119)) +- Direct Message names not visible on Admin panel ([#15114](https://github.com/RocketChat/Rocket.Chat/pull/15114)) + +
+๐Ÿ” Minor changes + +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) + +
+ +### ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป Core Team ๐Ÿค“ + +- [@ggazzo](https://github.com/ggazzo) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) + # 1.3.0 `2019-08-02 ยท 9 ๐ŸŽ‰ ยท 6 ๐Ÿš€ ยท 31 ๐Ÿ› ยท 31 ๐Ÿ” ยท 29 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` @@ -134,6 +160,14 @@ - [@sampaiodiego](https://github.com/sampaiodiego) - [@tassoevan](https://github.com/tassoevan) +# 1.2.4 +`2019-08-08` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + # 1.2.2 `2019-07-29` @@ -248,6 +282,14 @@ - [@sampaiodiego](https://github.com/sampaiodiego) - [@tassoevan](https://github.com/tassoevan) +# 1.1.5 +`2019-08-08` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + # 1.1.4 `2019-07-29` @@ -493,6 +535,25 @@ - [@sampaiodiego](https://github.com/sampaiodiego) - [@tassoevan](https://github.com/tassoevan) +# 1.0.5 +`2019-08-08 ยท 1 ๐Ÿ” ยท 1 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` + +### Engine versions +- Node: `8.11.4` +- NPM: `6.4.1` +- MongoDB: `3.2, 3.4, 3.6, 4.0` + +
+๐Ÿ” Minor changes + +- Fix custom auth ([#15141](https://github.com/RocketChat/Rocket.Chat/pull/15141)) + +
+ +### ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป Core Team ๐Ÿค“ + +- [@MarcosSpessatto](https://github.com/MarcosSpessatto) + # 1.0.4 `2019-07-29 ยท 1 ๐Ÿ› ยท 1 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` @@ -5308,4 +5369,4 @@ - [@marceloschmidt](https://github.com/marceloschmidt) - [@mrsimpson](https://github.com/mrsimpson) - [@rodrigok](https://github.com/rodrigok) -- [@sampaiodiego](https://github.com/sampaiodiego) \ No newline at end of file +- [@sampaiodiego](https://github.com/sampaiodiego) diff --git a/app/custom-oauth/server/custom_oauth_server.js b/app/custom-oauth/server/custom_oauth_server.js index 5becea434c06..660685296f9c 100644 --- a/app/custom-oauth/server/custom_oauth_server.js +++ b/app/custom-oauth/server/custom_oauth_server.js @@ -365,7 +365,7 @@ export class CustomOAuth { } if (serviceData.username) { - const user = Users.findOneByUsernameIgnoringCase(serviceData.username); + const user = Users.findOneByUsernameAndServiceNameIgnoringCase(serviceData.username, serviceName); if (!user) { return; } @@ -430,10 +430,9 @@ export class CustomOAuth { check(options, Match.ObjectIncluding({ accessToken: String, expiresIn: Match.Integer, - identity: Match.Maybe(Object), })); - const identity = options.identity || self.getIdentity(options.accessToken); + const identity = self.getIdentity(options.accessToken); const serviceData = { accessToken: options.accessToken, diff --git a/app/emoji-custom/client/admin/adminEmoji.js b/app/emoji-custom/client/admin/adminEmoji.js index 7a46f4c9cb0c..8f1ba6d8f3ba 100644 --- a/app/emoji-custom/client/admin/adminEmoji.js +++ b/app/emoji-custom/client/admin/adminEmoji.js @@ -48,7 +48,7 @@ Template.adminEmoji.helpers({ if ((currentTarget.offsetHeight + currentTarget.scrollTop) < (currentTarget.scrollHeight - 100)) { return; } - if (Template.instance().limit.get() > Template.instance().customemoji().length) { + if (instance.limit.get() > instance.customemoji().length) { return false; } instance.limit.set(instance.limit.get() + 50); diff --git a/app/lib/lib/roomTypes/direct.js b/app/lib/lib/roomTypes/direct.js index 8499332c8918..a0226c51f943 100644 --- a/app/lib/lib/roomTypes/direct.js +++ b/app/lib/lib/roomTypes/direct.js @@ -101,10 +101,6 @@ export class DirectMessageRoomType extends RoomTypeConfig { return Session.get(`user_${ subscription.name }_status_text`); } - getDisplayName(room) { - return room.usernames.join(' x '); - } - allowRoomSettingChange(room, setting) { switch (setting) { case RoomSettingsEnum.NAME: diff --git a/app/lib/server/oauth/facebook.js b/app/lib/server/oauth/facebook.js index f19aa01c622b..547eee346eb6 100644 --- a/app/lib/server/oauth/facebook.js +++ b/app/lib/server/oauth/facebook.js @@ -45,10 +45,9 @@ registerAccessTokenService('facebook', function(options) { accessToken: String, secret: String, expiresIn: Match.Integer, - identity: Match.Maybe(Object), })); - const identity = options.identity || getIdentity(options.accessToken, whitelisted, options.secret); + const identity = getIdentity(options.accessToken, whitelisted, options.secret); const serviceData = { accessToken: options.accessToken, diff --git a/app/lib/server/oauth/google.js b/app/lib/server/oauth/google.js index 848aa1c1c1b0..98b920a23550 100644 --- a/app/lib/server/oauth/google.js +++ b/app/lib/server/oauth/google.js @@ -35,7 +35,7 @@ registerAccessTokenService('google', function(options) { identity: Match.Maybe(Object), })); - const identity = options.identity || getIdentity(options.accessToken); + const identity = getIdentity(options.accessToken); const serviceData = { accessToken: options.accessToken, diff --git a/app/lib/server/oauth/twitter.js b/app/lib/server/oauth/twitter.js index d93499fb57f8..132af472a03d 100644 --- a/app/lib/server/oauth/twitter.js +++ b/app/lib/server/oauth/twitter.js @@ -38,10 +38,9 @@ registerAccessTokenService('twitter', function(options) { appId: String, accessTokenSecret: String, expiresIn: Match.Integer, - identity: Match.Maybe(Object), })); - const identity = options.identity || getIdentity(options.accessToken, options.appId, options.appSecret, options.accessTokenSecret); + const identity = getIdentity(options.accessToken, options.appId, options.appSecret, options.accessTokenSecret); const serviceData = { accessToken: options.accessToken, diff --git a/app/models/server/models/Users.js b/app/models/server/models/Users.js index 7149c11ec01d..e558c0177906 100644 --- a/app/models/server/models/Users.js +++ b/app/models/server/models/Users.js @@ -376,6 +376,16 @@ export class Users extends Base { return this.findOne(query, options); } + findOneByUsernameAndServiceNameIgnoringCase(username, serviceName, options) { + if (typeof username === 'string') { + username = new RegExp(`^${ s.escapeRegExp(username) }$`, 'i'); + } + + const query = { username, [`services.${ serviceName }.id`]: serviceName }; + + return this.findOne(query, options); + } + findOneByUsername(username, options) { const query = { username }; diff --git a/app/ui-admin/client/rooms/adminRooms.js b/app/ui-admin/client/rooms/adminRooms.js index 989417a72908..b7e9f7e2fa2a 100644 --- a/app/ui-admin/client/rooms/adminRooms.js +++ b/app/ui-admin/client/rooms/adminRooms.js @@ -12,18 +12,19 @@ import { SideNav, RocketChatTabBar, TabBar } from '../../../ui-utils'; import { t, roomTypes } from '../../../utils'; import { hasAllPermission } from '../../../authorization'; import { ChannelSettings } from '../../../channel-settings'; +import { getAvatarURL } from '../../../utils/lib/getAvatarURL'; export const AdminChatRoom = new Mongo.Collection('rocketchat_room'); Template.adminRooms.helpers({ url() { - return roomTypes.getConfig(this.t).getAvatarPath(this); + return this.t === 'd' ? getAvatarURL({ username: `@${ this.usernames[0] }` }) : roomTypes.getConfig(this.t).getAvatarPath(this); }, getIcon() { return roomTypes.getIcon(this); }, roomName() { - return roomTypes.getRoomName(this.t, this); + return this.t === 'd' ? this.usernames.join(' x ') : roomTypes.getRoomName(this.t, this); }, searchText() { const instance = Template.instance(); @@ -52,9 +53,6 @@ Template.adminRooms.helpers({ const rooms = Template.instance().rooms(); return rooms && rooms.count(); }, - name() { - return roomTypes.roomTypes[this.t].getDisplayName(this); - }, type() { return TAPi18n.__(roomTypes.roomTypes[this.t].label); }, diff --git a/app/utils/lib/RoomTypeConfig.js b/app/utils/lib/RoomTypeConfig.js index cb6e022942dd..0cd3c7ff4c21 100644 --- a/app/utils/lib/RoomTypeConfig.js +++ b/app/utils/lib/RoomTypeConfig.js @@ -150,15 +150,6 @@ export class RoomTypeConfig { return this._route; } - /** - * Gets the room's name to display in the UI. - * - * @param {object} room - */ - getDisplayName(room) { - return room.name; - } - allowRoomSettingChange(/* room, setting */) { return true; } diff --git a/app/utils/rocketchat.info b/app/utils/rocketchat.info index 410ecc32afa2..8a9436e88d3b 100644 --- a/app/utils/rocketchat.info +++ b/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "1.3.0" + "version": "1.3.1" } diff --git a/package.json b/package.json index 06564906cf40..aa24a8eb7c9b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "1.3.0", + "version": "1.3.1", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/"