webapp merge requestshttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests2017-09-13T15:53:02Zhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1086Fix readme after Docker compose cleanup2017-09-13T15:53:02Zusername-removed-892863contact@ericeastwood.comFix readme after Docker compose cleanupFix `README.md` after [Docker compose cleanup](https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1084/diffs#8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d_1_1)
- Remove merge conflict markers
- Restore some [lost changes](https://g...Fix `README.md` after [Docker compose cleanup](https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1084/diffs#8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d_1_1)
- Remove merge conflict markers
- Restore some [lost changes](https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1074)Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1084Simpler developer setup with Docker Compose2017-09-10T03:25:52ZAndrew Newdigateandrew@gitlab.comSimpler developer setup with Docker ComposeCurrently, Gitter requires docker toolbox in order to run.
This is an attempt at simplifying the docker setup to allow the use of Docker Toolbox for Mac and Windows for development.
The downside is that development and test setups...Currently, Gitter requires docker toolbox in order to run.
This is an attempt at simplifying the docker setup to allow the use of Docker Toolbox for Mac and Windows for development.
The downside is that development and test setups will not use multiple HA mongo and redis setups, but this should be tests in the beta environment.https://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1074Add instructions for Windows2017-09-10T03:25:25Zusername-removed-892863contact@ericeastwood.comAdd instructions for WindowsDocs update:
- Add instructions for Windows
- Remove global `gulp` install
- Add `source .env` alternate command for zsh or other non-bash flavor without `. .env`Docs update:
- Add instructions for Windows
- Remove global `gulp` install
- Add `source .env` alternate command for zsh or other non-bash flavor without `. .env`Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1075Initially build CSS fileset when using watch task2017-09-08T20:59:08Zusername-removed-892863contact@ericeastwood.comInitially build CSS fileset when using watch taskInitially build CSS fileset when using watch task.
Only builds entries that have been modified (entry itself or child dependencies).
---
Closes https://gitlab.com/gitlab-org/gitter/webapp/issues/1742
Closes https://gitlab.com/gitlab-...Initially build CSS fileset when using watch task.
Only builds entries that have been modified (entry itself or child dependencies).
---
Closes https://gitlab.com/gitlab-org/gitter/webapp/issues/1742
Closes https://gitlab.com/gitlab-org/gitter/webapp-temp-issues-for-move/issues/6Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1076Sign in with GitLab2017-08-29T13:47:01Zusername-removed-892863contact@ericeastwood.comSign in with GitLabAdd sign in with GitLab
![](http://i.imgur.com/1wMntLm.png)
---
### Todo
- [x] Get `@gitterHQ/styleguide` changes in the app
- [x] Add updates, `feature/add-gitlab-buttons`
- [x] Import to GitLab
- See https://gitlab.com...Add sign in with GitLab
![](http://i.imgur.com/1wMntLm.png)
---
### Todo
- [x] Get `@gitterHQ/styleguide` changes in the app
- [x] Add updates, `feature/add-gitlab-buttons`
- [x] Import to GitLab
- See https://gitlab.com/gitlab-org/gitter/styleguide/merge_requests/22/
- [x] Bump npm
- [x] Bump dependency
---
Closes https://gitlab.com/gitlab-org/gitter/webapp/issues/1752
Closes https://gitlab.com/gitlab-org/gitter/webapp-temp-issues-for-move/issues/11Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1081Ansible Build Image for doing deploys2017-08-18T16:36:51ZAndrew Newdigateandrew@gitlab.comAnsible Build Image for doing deployshttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1072Friendly iOS notification missing config errors2017-08-09T15:33:43Zusername-removed-892863contact@ericeastwood.comFriendly iOS notification missing config errorsFriendly messages for missing iOS notification config. These messages appear whenever the apps starts/restarts.
Is it fine to leave these as warnings? Do errors trigger something special in production if there is an actual config issu...Friendly messages for missing iOS notification config. These messages appear whenever the apps starts/restarts.
Is it fine to leave these as warnings? Do errors trigger something special in production if there is an actual config issue?
Should we just generate the certs in `obtain-secrets` or include some default ones and avoid the issue?
---
After:
```
2017-07-20T22:46:07.891Z - warn: ios push notification gateway (Prod) missing config, apn:certProd:undefined apn:keyProd:undefined
{ category: 'push-notifications' }
2017-07-20T22:46:07.899Z - warn: ios push notification gateway (Dev) missing config, apn:certDev:undefined apn:keyDev:undefined
{ category: 'push-notifications' }
2017-07-20T22:46:08.011Z - warn: ios push notification feedback (Dev) missing config, apn:certDev:undefined apn:keyDev:undefined
{ category: 'push-notifications' }
```
Before (keep in mind it wraps in the terminal which makes it longer):
```
2017-07-20T22:49:45.780Z - error: ios push notification feedback (Dev) experienced an error
{ error: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
category: 'push-notifications' }
2017-07-20T22:49:45.790Z - error: No error reporting is enabled so just logging to logger:
{ exception:
{ message: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
stack: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'\n at Error (native)\nFrom previous event:\n
at resolveCredential (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\resolve.js:17:31)\n at loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\load.js:14:20)\n at Feedback.loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:121:29)\n at Feedback.createSocket (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:151:7)\n at Feedback.request (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:278:7)\n at Feedback.start (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:270:7)\n at new Feedback (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:88:7)\n at createFeedbackEmitterForEnv (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:120:20)\n at Object.createFeedbackEmitter (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:163:14)\n at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/apn-feedback-listener.js:14:36)\n at C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:23:21\n at Array.forEach (native)\n
at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:22:19)\n at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\server\\web.js:26:30)\n at require (internal/module.js:20:19)\n at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\web.js:7:1)\n at run (bootstrap_node.js:352:7)\n at startup (bootstrap_node.js:144:9)\n at bootstrap_node.js:467:3',
name: 'Error' },
meta:
{ errorString: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
apnEnv: 'Dev' },
tags:
{ host: 'some-pc',
module: 'ios-notification-gateway',
job: 'web' } }
2017-07-20T22:49:45.794Z - error: ios push notification feedback (Dev) experienced a feedbackError
{ error: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
category: 'push-notifications' }
2017-07-20T22:49:45.795Z - error: No error reporting is enabled so just logging to logger:
{ exception:
{ message: 'ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
stack: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'\n at Error (native)\nFrom previous event:\n
at resolveCredential (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\resolve.js:17:31)\n at loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\credentials\\load.js:14:20)\n at Feedback.loadCredentials (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:121:29)\n at Feedback.createSocket (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:151:7)\n at Feedback.request (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:278:7)\n at Feedback.start (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:270:7)\n at new Feedback (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:88:7)\n at createFeedbackEmitterForEnv (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:120:20)\n at Object.createFeedbackEmitter (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:163:14)\n at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/apn-feedback-listener.js:14:36)\n at C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:23:21\n at Array.forEach (native)\n
at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:22:19)\n at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\server\\web.js:26:30)\n at require (internal/module.js:20:19)\n at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\web.js:7:1)\n at run (bootstrap_node.js:352:7)\n at startup (bootstrap_node.js:144:9)\n at bootstrap_node.js:467:3\nFrom previous event:\n at Feedback.createSocket (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:150:30)\n at Feedback.request (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:278:7)\n at Feedback.start (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:270:7)\n at new Feedback (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\node_modules\\apn\\lib\\feedback.js:88:7)\n at createFeedbackEmitterForEnv (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:120:20)\n at Object.createFeedbackEmitter (C:/Users/some-user/Documents/GitLab/webapp/modules/push-gateways/lib/ios/ios-notification-gateway.js:163:14)\n at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/apn-feedback-listener.js:14:36)\n at C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:23:21\n at Array.forEach (native)\n at Object.exports.install (C:/Users/some-user/Documents/GitLab/webapp/server/event-listeners/index.js:22:19)\n at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\server\\web.js:26:30)\n at require (internal/module.js:20:19)\n at Object.<anonymous> (C:\\Users\\some-user\\Documents\\GitLab\\webapp\\web.js:7:1)\n at run (bootstrap_node.js:352:7)\n at startup (bootstrap_node.js:144:9)\n at bootstrap_node.js:467:3',
name: 'Error' },
meta:
{ errorString: 'Error: ENOENT: no such file or directory, open \'C:\\Users\\some-user\\Documents\\GitLab\\webapp\\cert.pem\'',
apnEnv: 'Dev' },
tags:
{ host: 'some-pc',
module: 'ios-notification-gateway',
job: 'web' } }
```Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1071Add ability to revoke OAuth clients2017-08-08T14:49:25Zusername-removed-892863contact@ericeastwood.comAdd ability to revoke OAuth clientsAdd ability to revoke OAuth clients.
When a OAuth client has `revoked: true` property, we log them out and redirect to `/login/token-revoked`
![](http://i.imgur.com/d9hGtL7.png)
> #### Token was revoked
>
> We're very sorry, b...Add ability to revoke OAuth clients.
When a OAuth client has `revoked: true` property, we log them out and redirect to `/login/token-revoked`
![](http://i.imgur.com/d9hGtL7.png)
> #### Token was revoked
>
> We're very sorry, but the token you were using was revoked.
>
> You probably need to <a href="https://gitter.im/apps">update your client, https://gitter.im/apps</a>
---
Keep in mind we still have the same logic behind an invalid token. The following locations are just where we will actually redirect to `/login/token-revoked` instead of a generic 401.
- `server/web/middlewares/configure-csrf.js` for session
- `server/web/middlewares/authenticate-bearer.js` for `?access_token=xxx` query parameter
- Any others that should be here? :thinking:
- `server/web/middlewares/rememberme-middleware.js` doesn't seem to deal directly with access tokens, just "auth token" hashes to match against. Not sure how/when this is applied as `req.user` was always in place and the logic here was skipped anyways :confused:
- `server/web/passport.js` is used for the API and we shouldn't do any redirecting, just give the normal 401 status
- `server/web/bayeux/authenticator.js` is used for the WS bayeux API and we shouldn't do any redirecting, just give the normal 401 status
---
```
npm run mocha -- test/integration/services/oauth-service-test.js
```
---
```
db.oauthclients.insert({
name: 'Random test client1',
tag: 'random-test-client1',
clientKey: 'random-test-client1-key',
clientSecret: 'xxx',
});
```
```
db.oauthclients.update({ clientKey: 'random-test-client1-key' }, {
$set: {
revoked: true
}
});
```
```
db.oauthaccesstokens.insert({
token: 'xxx',
userId: db.users.findOne({ username: 'MadLittleMods' })._id,
clientId: db.oauthclients.findOne({ clientKey: 'random-test-client1-key' })._id,
});
```Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1073Use shared mongoose2017-08-08T14:31:45Zusername-removed-892863contact@ericeastwood.comUse shared mongooseUse shared mongoose instance, `require('gitter-web-mongoose-bluebird')` for what we `mongoose.connect` and `mongoose.connection.once('open', ...)`
I'm not sure why this suddenly stopped working but the app no longer starts unless I ma...Use shared mongoose instance, `require('gitter-web-mongoose-bluebird')` for what we `mongoose.connect` and `mongoose.connection.once('open', ...)`
I'm not sure why this suddenly stopped working but the app no longer starts unless I make this change as we [wait for mongo](https://gitlab.com/gitlab-org/gitter/webapp/blob/3ac404abb0fb160ee81249ce4b567474aea5d05b/server/web.js#L47) in several places.
- `mongoose@4.6.8`
- `@gitterhq/env@0.33.0`
---
`mongoose.connection.once('open', ...)`
- [`modules/persistence-utils/lib/on-mongo-connect.js`](https://gitlab.com/gitlab-org/gitter/webapp/blob/3ac404abb0fb160ee81249ce4b567474aea5d05b/modules/persistence-utils/lib/on-mongo-connect.js#L18) doesn't fire. Uses `require('mongoose')`
- [`@gitterHQ/env/lib/mongoose-connection-configurer.js`](https://github.com/gitterHQ/gitter-env/blob/a001560185bef8315143a826921da10576dc3fe7/lib/mongoose-connection-configurer.js#L61) event fires. Passed in `require('gitter-web-mongoose-bluebird')` and is where we `mongoose.connect`Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1067Simplify Docker2017-07-05T15:20:50ZAndrew Newdigateandrew@gitlab.comSimplify Dockerhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1070README typo ('dependant' is a noun, 'dependent' is an adjective)2017-07-04T15:27:12Zusername-removed-660961README typo ('dependant' is a noun, 'dependent' is an adjective)https://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1066Add .env to .gitignore to keep secrets secret2017-06-30T21:33:44Zusername-removed-892863contact@ericeastwood.comAdd .env to .gitignore to keep secrets secretAdd `.env` to `.gitignore` to keep secrets secret and maintain a clean git area.Add `.env` to `.gitignore` to keep secrets secret and maintain a clean git area.Andrew Newdigateandrew@gitlab.comAndrew Newdigateandrew@gitlab.comhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1065Release 19.0.02017-06-30T19:48:16ZAndrew Newdigateandrew@gitlab.comRelease 19.0.0Some cleanupSome cleanuphttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1063Updated dependencies2017-06-30T19:35:40ZAndrew Newdigateandrew@gitlab.comUpdated dependencieshttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1064gitlab ci build2017-06-30T19:25:27ZAndrew Newdigateandrew@gitlab.comgitlab ci buildhttps://staging.gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1062Add LICENSE and CONTRIBUTING.md.2017-06-30T06:59:28Zusername-removed-386624Add LICENSE and CONTRIBUTING.md.Fixes #1740Fixes #1740Mike Bartlettmike.bartlett@gmail.comMike Bartlettmike.bartlett@gmail.com