sails-permissions icon indicating copy to clipboard operation
sails-permissions copied to clipboard

Install instructions say to install "sails-auth"

Open toddgeist opened this issue 10 years ago • 3 comments

$ npm install sails-permissions sails-auth --save

sails-permissions install sails-auth version ^2.0. So why does it need to be installed again?

toddgeist avatar Oct 27 '15 02:10 toddgeist

ok, well I don't know why, but you do need to install it, and you need to make sure it is version 2 or better. So do this

$ npm install sails-permissions sails-auth@^2 --save

This also fixes #180

toddgeist avatar Oct 27 '15 02:10 toddgeist

So why does it need to be installed again?

sails-auth makes sure the user is logged in with a valid account ("authenticated"). Then, sails-permissions checks whether the request is authorized, given the particular Roles the user is granted. Both of these steps are necessary.

sails-auth is a separate module because it can be used on its own without sails-permissions

tjwebb avatar Oct 27 '15 05:10 tjwebb

Ok got it. So the issue here was that different versions where installed?

toddgeist avatar Oct 27 '15 12:10 toddgeist