Skip to content

Commit

Permalink
Remove old redirect for user creation
Browse files Browse the repository at this point in the history
Supplier creation was moved to the user app. Any tokens created before
the move will have linked to the supplier app still. Tokens are valid
for one week, so we needed to maintain the functionality of those
tokens by keeping a redirect on the old route to the user app.

It's been over a week so all tokens will now link to the user app. We
can remove this redirect and associate test.
  • Loading branch information
Wynndow committed Sep 22, 2017
1 parent c3dcb9b commit 0651d2b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions app/main/views/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
from ... import data_api_client


# Any invites sent before the new user-frontend becomes active will be linking to this route. We need to maintain it
# for seven days after the user-frontend goes live.
@main.route('/create-user/<string:encoded_token>', methods=['GET'])
def create_user(encoded_token):
return redirect(url_for('external.create_user', encoded_token=encoded_token), 301)


@main.route('/invite-user', methods=["GET"])
@login_required
def invite_user():
Expand Down
7 changes: 0 additions & 7 deletions tests/app/main/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
EMAIL_INVALID_ERROR = "Please enter a valid email address"


class TestCreateUser(BaseApplicationTest):
def test_should_redirect_to_the_user_frontend_app(self):
res = self.client.get('/suppliers/create-user/1234567890')
assert res.status_code == 301
assert res.location == 'http://localhost/user/create/1234567890'


class TestSupplierRoleRequired(BaseApplicationTest):
def test_buyer_cannot_access_supplier_dashboard(self):
with self.app.app_context():
Expand Down

0 comments on commit 0651d2b

Please sign in to comment.