codefordenver / partner-finder

Using an open dataset with registered colorado business to build a tool that manages outreach to potential CFD partners.
3 stars 14 forks source link

Change permissions on the GET user endpoints #169

Closed galbwe closed 3 years ago

galbwe commented 3 years ago

The GET /users and GET /users/{id} endpoints both require admin permissions, but we need ordinary users to have access to them so the frontend can validate usernames. Also these endpoints return password hashes, which is bad.

  1. Change GET /users and GET /users/{id} to require regular user permissions instead of admin permissions.
  2. Make sure password_hash is not returned in the response.
  3. Update the swagger documentation so the password field is no longer included.

The auth decorator in auth.py is what handles user authentication. The relevant views are defined in users.py.