-
Notifications
You must be signed in to change notification settings - Fork 155
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
Cannot create_role - permissions trying to save as list #673
Comments
Bummer - I must have missed some backwards compat - if you can - change your DB models to inherit from models.fsqlav3 and that should get things working. If that isn't practical give me a few days to patch this - I didn't intend to break fsqlav2 projects.. |
Thanks, will try that! |
Now - if an app uses fsqla_vX it just works. Added description in CHANGES on how apps that don't use fsqla_vX need to be modified. Added some tests to verify working with older DBs. The fsqlalchemy example was crazy - trying to use mocks made everything very complex. Converted to a simpler in-memory DB style testing. closes #673
Now - if an app uses fsqla_vX it just works. Added description in CHANGES on how apps that don't use fsqla_vX need to be modified. Added some tests to verify working with older DBs. The fsqlalchemy example was crazy - trying to use mocks made everything very complex. Converted to a simpler in-memory DB style testing. closes #673
Now - if an app uses fsqla_vX it just works. Added description in CHANGES on how apps that don't use fsqla_vX need to be modified. Added some tests to verify working with older DBs. The fsqlalchemy example was crazy - trying to use mocks made everything very complex. Converted to a simpler in-memory DB style testing. closes #673
* Fix backwards compat issues with permissions. Now - if an app uses fsqla_vX it just works. Added description in CHANGES on how apps that don't use fsqla_vX need to be modified. Added some tests to verify working with older DBs. The fsqlalchemy example was crazy - trying to use mocks made everything very complex. Converted to a simpler in-memory DB style testing. closes #673
I just pushed 5.0.2 - with that, and the fact that you are using fsqla_v2 in your models - you should need NO changes to get permissions working. Thanks for your patience. |
After updating to 5.0.1 (from 4.1.4), my tests are failing.
I create roles as:
but when I print it, it says role.permissions is
['manage-application', 'manage-users', 'login-as', 'see-debug', 'see-other', 'edit-other']
and when saving (tried SQLite and MySQL), I get error:
in SQLite:
and in MySQL (PyMySQL)
My role model is defined as:
I've read v5.0.0 changelog concerning this (https://flask-security-too.readthedocs.io/en/stable/changelog.html#version-5-0-0), but it seems like the permission list should be converted to string when saving to db, shouldn't it?
The text was updated successfully, but these errors were encountered: