Add a way to support skipping to the next handler on access denied #4

Closed
ForbesLindesay opened this Issue Dec 9, 2012 · 1 comment

1 participant

@ForbesLindesay

It would be useful to be able to have something like:

app.get('/', user.isAuthenticated, showAuthenticatedHomePage);
app.get('/', showAnonymousHomePage);

That API wouldn't be sufficient to differentiate between that and:

app.all('/admin*', user.is('admin'));
app.get('/admin/settings', showSettingsPage);

Perhaps we could support something like:

app.get('/', user.is('admin').here, showAdminHomePage);
app.get('/', user.isAuthenticated.here, showAuthenticatedHomePage);
app.get('/', showAnonymousHomePage);
@ForbesLindesay

This will be implemented in the next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment