trailsjs / sails-permissions

Comprehensive user permissions and entitlements system for sails.js and Waterline. Supports user authentication with passport.js, role-based permissioning, object ownership, and row-level security.
MIT License
418 stars 113 forks source link

sails-permissions waterlock compatibility #145

Closed maissani closed 9 years ago

maissani commented 9 years ago

There is an issue with sails-permissions and waterlock generators that can not be used as the same time.

wadedos commented 9 years ago

It's not possible at this time. It's not a problem with sails-permissions, but rather it's authentication dependancy sails-auth. sails-auth provides basic and cookie authentication. Where as waterlock provides jwt based authentication. To use these two libraries side by side you will have to fork and modify sails-permissions to not depend on sails-auth.

maissani commented 9 years ago

You have created a package that can be a must have for sails.

I think that Permissions does not have to provide, auth features. It's the work of Passport or Waterlock to handle it.

Permissions has a perimeter for policies,roles and user but must not handle authentification. Basicly at least you have to provide the choice of using sails-auth or waterlock as depedency. But that's not the problem, dev like me loves packages that let have the choice of everything . A simple example of crazyness of lock this choice is how will you handle with this generator authentication when you have to built jSONAPI with statless behavior. Is this feature is a With this example you can't, and your package will not been used and devs will have to create their own because you don't let the choice. Please consider that this is not a request but a must have. I think you must create an issue with: Possibility to choice between auth.

Best Regards,

wadedos commented 9 years ago

This package is maintained by @tjwebb at balderdash not me. So you will have to wait for his response. However I do agree with you, not every one wants basic and cookie authentication. But as this is being rapidly developed into 2.0. It's hard to expect the sails-auth dependancy to be removed anytime soon.

tjwebb commented 9 years ago

@maissani

There is an issue with sails-permissions and waterlock generators that can not be used as the same time.

Compatibility with Waterlock was never a design consideration of this module. For starters, I've never used Waterlock before and I have no idea what a "waterlock generator" is . If you'd like to help resolve this, PRs are welcome.