Refactor API key authentication to use Catalyst's ActionRole(s) via Does() so that one can attach other roles to various actions as well
Comment out verbose debugging comments
Add table "auth_user_requests" to log all user requests, table "auth_user_request_daily_counts" to log daily request statistics (which can be later converted to weekly statistics), and a database trigger that would log each request to the aggregated "daily counts" table
Add "MediaWords::ActionRole::Logged" action role which will log enabled actions to the "auth_user_requests" table
Use the logging action role in API controller actions, "/search" and "/search/wc"; in "/search", set the "requested" items (stories) to the number of returned stories if "csv=1"
Merge branch 'master' into user_tracking_reporting_throttling
Add index to auth_user_request_daily_counts.email and auth_user_request_daily_counts.day
Create table "auth_user_limits" to store request / requested items limits for authenticated users
rename run_model ==> run_model_data_file.
Purge unused method run_model_data_file
Purge private unused method.
Clean up code and make methods private.
Merge branch 'master' into user_tracking_reporting_throttling
Make auth_user_limits.auth_users_id unique because there should be only a single limit set for each user
Rename column to fit better with the rest of the naming scheme
Fetch a list of user roles from the Catalyst's user object
Move reusable helper subroutine to MediaWords::ActionRole::AbstractAuthenticatedActionRole
When not authenticated (either via the API key or normal means), only warn that logging won't be available and don't die()
Add MediaWords::ActionRole::Throttled action role that puts a weekly requests / requested stories limit on configured controller actions
Merge branch 'master' of github.com:berkmancenter/mediacloud