Code Monkey home page Code Monkey logo

Comments (9)

jirikuncar avatar jirikuncar commented on July 4, 2024 1

Closed via 731958c

from flask-security-fork.

jirikuncar avatar jirikuncar commented on July 4, 2024

It looks fine. Just make sure that you include tests and docs. Thanks!

from flask-security-fork.

AlMaVizca avatar AlMaVizca commented on July 4, 2024

Unfortunately, I couldn't figure out why the test is not passing.

`
| assert datastore.add_role_to_user(user, 'editor') is True
| > assert datastore.add_role_to_user(user, 'editor') is False
| E assert True is False

`

@illume Does the method add_role_to_user work for you?

from flask-security-fork.

illume avatar illume commented on July 4, 2024

@krahser note, the SQLAlchemyUserDatastore had some changes too. Thanks heaps for doing this!

from flask-security-fork.

AlMaVizca avatar AlMaVizca commented on July 4, 2024

Yes, I saw that, but it's not necessary. If you make the query as is defined it works too.
Just to be sure I test both ways and I get the same error.

from flask-security-fork.

AlMaVizca avatar AlMaVizca commented on July 4, 2024

I realize that the mistake was in the backref definition on the user model.

It's alredy pushed. Now all the tests pass and It's also the beginning of docs in my fork.
I hope to finish this tomorrow.

from flask-security-fork.

illume avatar illume commented on July 4, 2024

I made some changes here: https://github.com/illume/flask-security-fork/tree/flask_sqlalchemy_session

There was some failures with old versions of flask-sqlalchemy. http://stackoverflow.com/questions/20201809/sqlalchemy-flask-attributeerror-session-object-has-no-attribute-model-chan

I added a fix for that in the branch. All the tests pass on travis now.

from flask-security-fork.

illume avatar illume commented on July 4, 2024

Cool. I'll leave the rest to you. See "def commit" here: https://github.com/illume/flask-security-fork/tree/flask_sqlalchemy_session

from flask-security-fork.

illume avatar illume commented on July 4, 2024

Thanks!

from flask-security-fork.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.