Make admin simply a boolean instead of group

This simplifies a lot of logic. Keeping an admin group has no benefit
This commit is contained in:
Girish Ramakrishnan
2018-07-26 17:17:52 -07:00
parent 39848a25a8
commit 78a2176d1d
18 changed files with 280 additions and 359 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ function hasScopes(authorizedScopes, requiredScopes) {
}
function scopesForUser(user) {
return users.isAdmin(user) ? exports.VALID_SCOPES : [ 'profile', 'apps:read' ];
return user.admin ? exports.VALID_SCOPES : [ 'profile', 'apps:read' ];
}
function validateToken(accessToken, callback) {