mirror of
https://github.com/wassname/flask-security.git
synced 2026-06-27 16:10:11 +08:00
Add @anonymous_user_required to register endpoint. Fixes #212
This commit is contained in:
@@ -98,6 +98,7 @@ def logout():
|
||||
get_url(_security.post_logout_view))
|
||||
|
||||
|
||||
@anonymous_user_required
|
||||
def register():
|
||||
"""View function which handles a registration request."""
|
||||
|
||||
|
||||
@@ -347,6 +347,7 @@ class LoginWithoutImmediateConfirmTests(SecurityTest):
|
||||
|
||||
with capture_registrations() as registrations:
|
||||
self.register(e1)
|
||||
self.logout()
|
||||
self.register(e2)
|
||||
token1 = registrations[0]['confirm_token']
|
||||
token2 = registrations[1]['confirm_token']
|
||||
|
||||
Reference in New Issue
Block a user