GamerPolls / gamerpolls.com

A polling site geared towards use by streamers on Twitch.
http://gamerpolls.com/
GNU General Public License v3.0
5 stars 2 forks source link

Prep for server switch #47

Closed cletusc closed 10 years ago

cletusc commented 10 years ago

This is the diff to revert this change for when the server switch happens.

diff --git a/app/libs/locals.js b/app/libs/locals.js
index 791604f..00b269f 100644
--- a/app/libs/locals.js
+++ b/app/libs/locals.js
@@ -25,7 +25,7 @@ module.exports = function (request, response, next) {
        });

        response.locals.user.hasSubButton = request.session.twitchtv.hasSubButton;
-       response.locals.user.isBetaTester = false;
+       response.locals.user.isBetaTester = request.session.twitchtv.hasSubButton || this.nconf.get('betaTesters').split(',').indexOf(request.user.username) >= 0;
        request.session.isBetaTester = response.locals.user.isBetaTester;
    }

@@ -42,10 +42,6 @@ module.exports = function (request, response, next) {
            type: type
        });
    }
-   messages.push({
-       text: 'We will be moving the site to a new server between Friday 03/14/14 and Saturday 03/15/14. As a result, we will be starting the database fresh and all polls will be deleted. For beta testers, the ability to create polls has been disabled for now and will be re-enabled once we make the switch.',
-       type: 'error'
-   });
    response.locals.flash = messages;

    response.locals.loggedIn = request.isAuthenticated();

Once the switch happens, apply change, then close this issue.