Commit c0f15ad7 authored by Eric Eastwood's avatar Eric Eastwood

Merge branch 'release/19.38.0'

parents 65422028 6562b95d
# 19.38.0 - *upcoming*
# 19.38.0 - 2019-2-27
- Make Gitter markdown readme badge snippet visible for all rooms (share modal)
- Thanks to [@jamesgeorge007](https://gitlab.com/jamesgeorge007) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1324
......@@ -6,8 +6,12 @@
- Thanks to [@gtsiolis](https://gitlab.com/gtsiolis) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1341
- Update version badge at the top(`DEV`) to link to the GitLab repo
- Thanks to [@vicek22](https://gitlab.com/vicek22) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1345
- Update create room primary button style in `/home/explore` for better consistency
- Update create room primary button(caribbean) style in `/home/explore` for better consistency
- Thanks to [@gtsiolis](https://gitlab.com/gtsiolis) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1342
- Update left menu explore button style(jaffa) for better consistency
- Thanks to [@gtsiolis](https://gitlab.com/gtsiolis) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1350
- Add "Open Source" link to `webapp` GitLab project repository on the homepage
- Thanks to [@gtsiolis](https://gitlab.com/gtsiolis) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1346
Developer facing:
......@@ -15,6 +19,16 @@ Developer facing:
- Add docs on how Gitter uses Prettier for styling/formatting(lint), https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1348
- Update `.gitignore` to ignore anything `.env*` related to avoid leaking mis-named files or backup files created by editors
- Thanks to [@gtsiolis](https://gitlab.com/gtsiolis) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1349
- Fix `rename-room.js` util scripts so it can move room to a different group/community
- Thanks to [@vicek22](https://gitlab.com/vicek22) for the contribution, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1344
- Fix NPE when lowercasing emails on login/new-user, https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1352
# 19.37.1 - 2019-2-26
- Fix CSRF to sign in as another user (OAuth callback),
- https://gitlab.com/gitlab-org/gitter/webapp/issues/2074
- https://gitlab.com/gitlab-org/gitter/webapp/issues/2069
# 19.37.0 - 2019-2-19
......
<div class="panel-footer__item--search" id="panel-footer--search">
<h1 class="panel-footer__title">Discover Everything</h1>
<h2 class="panel-footer__desc">Find more communities to join</h2>
<a class="panel-footer__button subdued-button-caribbean--xsmall" href="/home/explore">Explore</a>
<a class="panel-footer__button subdued-button-jaffa--xsmall" href="/home/explore">Explore</a>
<img class="panel-footer__img" src="{{cdn "images/svg/menu/explore-background.svg"}}" />
</div>
<div class="panel-footer__item--all" id="panel-footer--all">
......
......@@ -3,7 +3,7 @@
#intro-panel .top-navigation { left: 160px !important; }
}
@media only screen and (max-width : 759px) {
@media only screen and (max-width : 900px) {
.top-navigation { display: none; }
}
......
......@@ -599,7 +599,7 @@ h1:after, h2:after {
.site-nav a {
float: left;
margin-right: 60px;
margin-right: 40px;
line-height: 26px;
font-weight: bold;
......
......@@ -36,6 +36,7 @@
<div class="top-navigation menu-animation">
<a href="#integrations-panel">{{ __ "Integrations" }}</a>
<a href="#apps-panel">{{ __ "Apps" }}</a>
<a href="https://gitlab.com/gitlab-org/gitter/webapp" target="_blank">{{ __ "Open Source" }}</a>
</div>
<a class="btn login" href="/login?action=login&source=intro-login">
......
......@@ -5,6 +5,8 @@
var shutdown = require('shutdown');
var persistence = require('gitter-web-persistence');
var uriLookupService = require('gitter-web-uri-resolver/lib/uri-lookup-service');
var troupeService = require('gitter-web-rooms/lib/troupe-service');
var groupService = require('gitter-web-groups/lib/group-service');
var readline = require('readline');
var Promise = require('bluebird');
......@@ -30,10 +32,7 @@ var newUri = opts.new;
var lcOld = oldUri.toLowerCase();
var lcNew = newUri.toLowerCase();
function findRoom(uri) {
return persistence.Troupe.findOne({ lcUri: uri.toLowerCase() }).exec();
}
var lcNewGroup = lcNew.split(/\//)[0];
function confirm() {
var rl = readline.createInterface({
......@@ -54,49 +53,57 @@ function confirm() {
});
}
return Promise.join(findRoom(lcOld), findRoom(lcNew), function(room, clashRoom) {
if (clashRoom) {
throw new Error('URI Clash: ' + lcNew);
}
if (!room) {
throw new Error('Room does not exist: ' + lcOld);
}
if (room.githubType === 'REPO') {
// This has not been tested
throw new Error('Do not rename repo rooms using this script');
}
console.log('BEFORE', {
uri: room.uri,
lcUri: room.lcUri,
lcOwner: room.lcOwner,
renamedLcUris: room.renamedLcUris,
githubType: room.githubType
});
room.uri = newUri;
if (room.lcOwner) {
var newLcOwner = lcNew.split(/\//)[0];
room.lcOwner = newLcOwner;
}
room.lcUri = lcNew;
/* Only add if it's not a case change */
if (lcOld !== lcNew) {
room.renamedLcUris.addToSet(lcOld);
return Promise.join(
troupeService.findByUri(lcOld),
troupeService.findByUri(lcNew),
groupService.findByUri(lcNewGroup),
function(room, clashRoom, newGroup) {
if (clashRoom) {
throw new Error('URI Clash: ' + lcNew);
}
if (!room) {
throw new Error('Room does not exist: ' + lcOld);
}
if (!newGroup) {
throw new Error('Attempt to move the room into non-existent group: ' + lcNewGroup);
}
if (lcNew === lcNewGroup) {
throw new Error('Trying to rename room to a group: ' + lcNewGroup);
}
if (room.githubType === 'REPO') {
// This has not been tested
throw new Error('Do not rename repo rooms using this script');
}
console.log('BEFORE', {
uri: room.uri,
lcUri: room.lcUri,
groupId: room.groupId,
renamedLcUris: room.renamedLcUris,
githubType: room.githubType
});
room.uri = newUri;
room.groupId = newGroup._id;
room.lcUri = lcNew;
/* Only add if it's not a case change */
if (lcOld !== lcNew) {
room.renamedLcUris.addToSet(lcOld);
}
console.log('AFTER', {
uri: room.uri,
lcUri: room.lcUri,
groupId: room.groupId,
renamedLcUris: room.renamedLcUris,
githubType: room.githubType
});
return confirm().return(room);
}
console.log('AFTER', {
uri: room.uri,
lcUri: room.lcUri,
lcOwner: room.lcOwner,
renamedLcUris: room.renamedLcUris,
githubType: room.githubType
});
return confirm().return(room);
})
)
.then(function(room) {
console.log('Updating');
......
......@@ -13,7 +13,9 @@ module.exports = function trackNewUser(req, user, provider) {
emailAddressService(user).then(function(email) {
const emailList = user.emails || [];
emailList.unshift(email);
const lowerCaseEmailList = emailList.map(email => email.toLowerCase());
// We are sanitizing the data a bit here so the database
// doesn't store `null` and duplicate case different emails
const lowerCaseEmailList = emailList.filter(email => !!email).map(email => email.toLowerCase());
user.emails = _.uniq(lowerCaseEmailList);
stats.userUpdate(
......
......@@ -14,7 +14,9 @@ module.exports = function trackUserLogin(req, user, provider) {
const emailList = user.emails || [];
emailList.unshift(email);
const lowerCaseEmailList = emailList.map(email => email.toLowerCase());
// We are sanitizing the data a bit here so the database
// doesn't store `null` and duplicate case different emails
const lowerCaseEmailList = emailList.filter(email => !!email).map(email => email.toLowerCase());
user.emails = _.uniq(lowerCaseEmailList);
stats.userUpdate(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment