code-dot-org/dashboard — pull request #217 by cpirich (2013-12-10 21:40:14+00:00)
Title: Phase 1: conditionally hide prize ui for non-US users

DO NOT MERGE UNTIL AFTER CSEDWEEK

Rather than sprinkle "U.S. users only" all over the place, our longer-term goal has been to hide the references to prizes for users outside the U.S.

Because we have had concerns around calling the performance implications of calling the geolocation server for many of the views for signed in users, the assumption has been the we will create an asynchronous background task that will mark users in the database as "U.S. users" or not based on a sign-in IP.

This PR is Phase 1 - it makes all of the references to prizes disappear based on that User.show_prize_ui? method - but for now, that method always returns true (meaning no change for today's current behavior).

Phase 2 will actually implement that show_prize_ui? method after researching the best way to mark the users as "U.S." or not.