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

In casbin/dbal-adapter, the loadPolicy method runs select the column ptype, but the table is p_type #1

Closed
894480109 opened this issue Dec 15, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@894480109
Copy link

casbin/casbin#661

The file is src/Adapter.php,on Line 117, Thanks!

@leeqvip
Copy link
Member

leeqvip commented Dec 15, 2020

@894480109 Indeed, the field names are not exactly the same in different languages, but ptype is used uniformly in PHP-Casbin.

@hsluoyz
Copy link
Member

hsluoyz commented Dec 15, 2020

@894480109 are you using 2 or more languages? Like Go and PHP?

@894480109
Copy link
Author

@894480109 are you using 2 or more languages? Like Go and PHP?

Yes, you are right, another project is Go, but I use PHP, and I have to read the table to show the rbac or privilege list, now I overload the adapter class to solve the problem, can you give some other advice? Thanks!

@894480109
Copy link
Author

@894480109 Indeed, the field names are not exactly the same in different languages, but ptype is used uniformly in PHP-Casbin.

Hopefully can use cross the languages with the table structure,Thanks!

@hsluoyz
Copy link
Member

hsluoyz commented Dec 16, 2020

@techoner I think the Go lib should be treated as standard. The PHP side can be modified to use p_type.

@leeqvip leeqvip added the enhancement New feature or request label Dec 16, 2020
@leeqvip
Copy link
Member

leeqvip commented Dec 16, 2020

@894480109 It has been fixed in version 2.0.
DBAL adapter 2.0.0

@894480109
Copy link
Author

@894480109 It has been fixed in version 2.0.
DBAL adapter 2.0.0

Good jobs! Thanks !

@leeqvip leeqvip closed this as completed Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants