Skip to content

Commit 3155c58

Browse files
author
Tom Kirkpatrick
committed
Disable passthrough access with access filtering on static methods
1 parent 1583970 commit 3155c58

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ module.exports = function loopbackComponentAccess(app, options) {
2626

2727
// Set up role resolvers.
2828
accessUtils.setupRoleResolvers();
29+
30+
// TODO: Rethink wether access filtering can be applied safely.
2931
// Set up model opertion hooks
30-
accessUtils.setupModels();
31-
// TODO: Create Group Access model automatically if one hasn't been specified
32+
// accessUtils.setupModels();
33+
34+
// TODO: Create Group Access model automatically if one hasn't been specified
3235
};

lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ module.exports = class AccessUtils {
287287

288288
if (!context || !context.model || !context.modelId) {
289289
process.nextTick(() => {
290-
debug('Allow passthrough access (context: %s, context.model: %s, context.modelId: %s)',
290+
debug('Deny access (context: %s, context.model: %s, context.modelId: %s)',
291291
!!context, !!context.model, !!context.modelId);
292-
if (cb) cb(null, true);
292+
if (cb) cb(null, false);
293293
});
294294
return;
295295
}

0 commit comments

Comments
 (0)