platform-coop-toolkit / coop-map-directory-index

The Map/Directory/Index component of the Platform Cooperative Development Kit.
https://directory.platform.coop
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Visiting profile creation URL initiates process even if user has a profile already #143

Closed greatislander closed 4 years ago

greatislander commented 4 years ago

Describe the bug

Visiting /add/individual (the individual profile creation URL) initiates the process of creating an individual profile even if the logged-in user has a profile already.

To Reproduce

Steps to reproduce the behavior:

  1. Log in.
  2. Ensure that you have a profile.
  3. Visit /add/individual.
  4. See empty Step 1 form.

Expected behavior

The user should be redirected to their profile and an error message should be displayed.

Additional Context

The only check currently performed determines if the user is logged in. An additional check is needed for User.has_profile.