lingthio / Flask-User

Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.
http://flask-user.readthedocs.io/
MIT License
1.06k stars 292 forks source link

Documentation v1.0 UserRoles data-models incorrect example #308

Open olbliss opened 4 years ago

olbliss commented 4 years ago

Documentation v1.0, “Optional Role and UserRoles data-models”, states users are assigned one or more roles by adding them to the User.roles property: #Create 'user007' user with 'secret' and 'agent' roles

The documentation seems to be missing user1.roles.append(Role(name='secret')) user1.roles.append(Role(name='agent'))

Instead it shows the creation of an ‘Admin’ role.

Chaostheorie commented 4 years ago

The mentioned lines are from here: https://github.com/lingthio/Flask-User/blob/5c652e6479036c3d33aa1626524e4e65bd3b961e/flask_user/tests/tst_app.py#L197