Permalink
Browse files

changing admins to a list in config ratehr than object

  • Loading branch information...
cmcavoy committed Jul 10, 2012
1 parent f2575b7 commit f6d759d9c19342a269ed5aa264c4e8066414ae43
Showing with 2 additions and 2 deletions.
  1. +1 −1 controllers/backpack.js
  2. +1 −1 lib/environments/local-dist.js
View
@@ -98,7 +98,7 @@ exports.stats = function stats(request, response, next) {
var user = request.user;
var adminUsers = configuration.get('admins');
- if (! user || ! adminUsers[user.attributes.email]) {
+ if (! user || ! adminUsers.indexOf(user.attributes.email) === -1) {
return response.send('Must be an admin user', 403);
}
@@ -20,7 +20,7 @@ exports.config = {
badge_path: path.join(__dirname, '../../static/_badges'),
// Administrators, users with these accounts can access certain pages
- admins: {'example@example.com': true},
+ admins: ['example@example.com']
// Database configuration
// Make sure to create a user that has full privileges to the database

0 comments on commit f6d759d

Please sign in to comment.