Sails: Could not disable shadow route for `index` action in sails v0.12.3

Created on 3 Mar 2017  路  6Comments  路  Source: balderdashy/sails

Sails version: 0.12.3
Node version: 4.2.3
NPM version: 2.14.7
Operating system: Ubuntu 14.04



Could not disable blueprint routes.

Situation:
I have a UserController having index action and corresponding User model and I have bind
/guests to UserController's index action. Now I want to disable blueprint route provided by sails, so that /guests should be the only endpoint for User index action.
So I have set

module.exports.blueprints = {
  actions: false,
  rest: false,
  shortcuts: false
};

However this seems to have no effect, and I could still list all users using /user endpoint.

I have created a test project with the configuration I mentioned.

Steps to reproduce

  1. Setup app
git clone https://github.com/sujanadiga-practo/sails-test
cd sails-test
npm install
sails lift
  1. Go to localhost:1337/user
    _Expected_: 404(since this route is not bound to any action in routes and blueprints are disabled)

_Obtained_:

{
  "message": "Users fetched",
  "users": []
}
bug

All 6 comments

screen shot 2017-03-03 at 4 22 30 pm

Also http method seems to have no effect

@sujanadiga-practo thanks for the report- verified in latest sails 0.12.x. We'll follow up with a patch momentarily.

@sgress454 thanks!

Its fixed in v0.12.13, thank you @mikermcneil

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kesavkolla picture kesavkolla  路  4Comments

Alirezamohammadi picture Alirezamohammadi  路  4Comments

Sytten picture Sytten  路  4Comments

victory-deployment picture victory-deployment  路  4Comments

mahfuzur picture mahfuzur  路  3Comments