Fix issue where normal users are shown all apps
This commit is contained in:
@@ -58,7 +58,7 @@ function getApp(req, res, next) {
|
||||
function getApps(req, res, next) {
|
||||
assert.strictEqual(typeof req.user, 'object');
|
||||
|
||||
apps.getAll(function (error, allApps) {
|
||||
apps.getAllByUser(req.user, function (error, allApps) {
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
allApps = allApps.map(apps.removeRestrictedFields);
|
||||
@@ -574,4 +574,4 @@ function setOwner(req, res, next) {
|
||||
|
||||
next(new HttpSuccess(200, { }));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user