Remove user.admin property

The UI will now base itself entirely off the scopes of the token
This commit is contained in:
Girish Ramakrishnan
2018-06-17 16:13:45 -07:00
parent 156ffb40c9
commit f24a099e79
6 changed files with 17 additions and 24 deletions

View File

@@ -298,10 +298,6 @@ function list(callback) {
userdb.getAllWithGroupIds(function (error, results) {
if (error) return callback(new UsersError(UsersError.INTERNAL_ERROR, error));
results.forEach(function (result) {
result.admin = result.groupIds.indexOf(constants.ADMIN_GROUP_ID) !== -1;
});
return callback(null, results);
});
}
@@ -328,7 +324,6 @@ function get(userId, callback) {
if (error) return callback(new UsersError(UsersError.INTERNAL_ERROR, error));
result.groupIds = groupIds;
result.admin = groupIds.indexOf(constants.ADMIN_GROUP_ID) !== -1;
return callback(null, result);
});