Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node-Casbin@6 planning #352

Closed
2 of 3 tasks
nodece opened this issue Mar 22, 2022 · 11 comments
Closed
2 of 3 tasks

Node-Casbin@6 planning #352

nodece opened this issue Mar 22, 2022 · 11 comments
Assignees
Labels
question Further information is requested

Comments

@nodece
Copy link
Member

nodece commented Mar 22, 2022

Node-Casbin@6 full-support any JavaScript platform like React Native, Electron, and so on.

Branch: https://github.com/casbin/node-casbin/tree/beta

I make some planning for this version:

  • Only support pass the Model instance, Adapter instance and enableLog to newEnforcer(), avoid confusing that use path or text
  • Cleanup the code with "path", "file"
  • Collect the breaking changes, which is used to make a migrate doc
@casbin-bot
Copy link
Member

@casbin-bot casbin-bot added the question Further information is requested label Mar 22, 2022
@Shivansh-yadav13
Copy link
Member

Hey @nodece, I would like to contribute to this, I want to confirm that we are planning to sort of rebuild the newEnforcer() and going to pass in 3 params right?

@nodece
Copy link
Member Author

nodece commented Mar 22, 2022

Yes, but some parameters are optional, so like:

newEnforcer(model)
newEnforcer(model, adapter)
newEnforcer(model, adapter, true)

// Not sure if is correct behavior.
newEnforcer(model, true)

We can open this issue for a while to discuss.

@Shivansh-yadav13
Copy link
Member

ohk then I guess for a request like this

newEnforcer(model, true)

we can maybe keep ...params: any[] in the newEnforcer() and then pass them in a fixed manner in newEnforcerWithClass(model, adapter, true)

@nodece
Copy link
Member Author

nodece commented Mar 23, 2022

Both newEnforcer() and newEnforcerWithClass params need to changes.

@Shivansh-yadav13
Copy link
Member

@nodece, there are no breaking changes on params change in the tests at least.

@nodece
Copy link
Member Author

nodece commented Mar 24, 2022

We remove some API with fs or path, this is breaking changes.

@hsluoyz
Copy link
Member

hsluoyz commented Apr 15, 2022

We don't have the ability to control the damage caused by the breaking changes based on our developer resources. So we don't accept any kind of breaking changes.

@wittech
Copy link

wittech commented Apr 29, 2022

how to config muti policies?

@Shivansh-yadav13
Copy link
Member

@wittech if you have a question, you can ask in the Gitter channel https://gitter.im/casbin/Lobby

@nodece
Copy link
Member Author

nodece commented May 22, 2022

Migrating to https://github.com/casbin/casbin-core for this thing.

@hsluoyz hsluoyz closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants