Merge branch 'hotfix/21.56.9' into master
[gitter.git] / server / web / middlewares / ensure-logged-in-or-get.js
blob39c6f681a5c97a3ff6ec0339204a5139137fc781
1 'use strict';
3 var loginRequired = require('./login-required');
5 module.exports = function(req, res, next) {
6 if (req.user) {
7 return next();
10 if (req.method === 'GET') {
11 return next();
14 loginRequired(req, res, next);