Commit Graph

1706 Commits

Author SHA1 Message Date
Logan Hanks
5a170ee590 Improve layout of app icon uploader. 2012-08-22 15:05:12 -07:00
Logan Hanks
bd08154d4c Add api docs for app-related methods. 2012-08-22 15:05:12 -07:00
Logan Hanks
d1b46854f9 Hide app creation form until button is clicked. 2012-08-22 15:05:12 -07:00
Logan Hanks
df3e26873b Upload app icons to S3. 2012-08-22 15:05:11 -07:00
Logan Hanks
961c2e8116 Show list of developers in app details. 2012-08-22 15:05:11 -07:00
Logan Hanks
f7236f99e3 Fade out apps when revoked or deleted. 2012-08-22 15:05:11 -07:00
Logan Hanks
545e1c7a3b Clean up the developed apps UI. 2012-08-22 15:05:11 -07:00
Max Goodman
d56046f1d0 Check token validity when verifying OAuth2 requests. 2012-08-22 15:05:11 -07:00
Max Goodman
1fd9c0662a Rename access token is_valid to avoid __getattr__ silliness 2012-08-22 15:05:11 -07:00
Max Goodman
b94978a647 Fix: add client_id to OAuth2 access tokens. 2012-08-22 15:05:11 -07:00
Max Goodman
09c60ba42d Switch user ids to id36s for consistency and str type keys. 2012-08-22 15:05:11 -07:00
Max Goodman
9f7bdd8113 Add comment OAuth2 scope. 2012-08-22 15:05:11 -07:00
Max Goodman
deff9405da Add OAuth2 handling to the main APIController. 2012-08-22 15:05:11 -07:00
Max Goodman
81caf1213d Add support for multiple scopes per OAuth2 access token. 2012-08-22 15:05:11 -07:00
Max Goodman
35006858cb Clean up VClientID validator. 2012-08-22 15:05:11 -07:00
Dave Pifke
51c35458bb Implement revoke/remove/delete buttons on /pref/apps.
These are ynbuttons, which cannot appear within an existing form.
Thus the "delete app" link appears in an awkward place and the
"remove developer" link currently won't work at all.  chromakode
said he was going to take a look at modifying ynbutton to fix this.

This commit fixes a bug in the OAuth2Client.delete().
2012-08-22 15:05:11 -07:00
Dave Pifke
b388dc979f Creating and updating apps now works. 2012-08-22 15:05:11 -07:00
Dave Pifke
d7fbadfcd7 Start building view for managing apps. 2012-08-22 15:05:11 -07:00
Dave Pifke
6d293a08bc Add API methods for managing apps. 2012-08-22 15:05:11 -07:00
Dave Pifke
808336ccd8 Fix AttributeError on OAuth2Client.deleted. 2012-08-22 15:05:11 -07:00
Dave Pifke
fe907eb1c4 Navigation for "apps" tab on preferences.
Adding some controller code and template for the apps tab.  Currently
just a skeleton.
2012-08-22 15:05:11 -07:00
Dave Pifke
576557244d Tweaks to OAuth2 models.
Adds the clients-by-user lookup, deletion of clients, and renames
some classes and methods to be more consistent.
2012-08-22 15:05:11 -07:00
Dave Pifke
cc40171cf5 OAuth client/token relationships with Accounts
Update the models to be able to update and query:

 - Which OAuth2Clients are developed by a user?
 - Who are the developers of an OAuth2Client?
 - What OAuth2AccessTokens are outstanding for a user?

There's some duplicated code here, and tests are needed, but it's
functional.
2012-08-22 15:05:11 -07:00
Max Goodman
56a1d9054b Refactor state value passing to OAuth2 error responses. 2012-08-22 15:05:11 -07:00
Dave Pifke
9001852a40 Pass the state value in OAuth2 error redirects. 2012-08-22 15:05:11 -07:00
Dave Pifke
961495b003 Refactor /api/v1/authorize error handling. 2012-08-22 15:05:11 -07:00
Dave Pifke
c826725c3c Add error message to OAuth2 invalid redirect URI failure. 2012-08-22 15:05:11 -07:00
Jason Harvey
367c4201a3 Add accounts_active information to the JSON template. 2012-08-22 11:04:15 -07:00
Jason Harvey
90fb87da88 Modify display of accounts_active info.
This now relies on the fudged number from subreddit.py for obscurity.

Rewords the default text, and title text of the metric.

Adds a "fudged" class to the block so that low values can be hidden through CSS.
2012-08-22 11:04:15 -07:00
Jason Harvey
97eb911710 Add a random jitter to accounts_activity metric. 2012-08-22 11:04:14 -07:00
Max Goodman
034aeef022 Stop stripping unicode characters from subreddits_by_topic. 2012-08-21 16:37:18 -07:00
Max Goodman
62792b8731 Use SearchQuery in subreddits_by_topic. 2012-08-21 16:37:18 -07:00
Max Goodman
ca2a05fa34 Return Subreddit objects from subreddit_facets(). 2012-08-21 16:37:18 -07:00
Max Goodman
7dbb0ad337 Add faceting param to CloudSearchQuery. 2012-08-21 16:37:17 -07:00
Max Goodman
2a0dfb4f40 Rename "facets" -> "faceting" in search funcs.
To avoid confusion with "facets" in search result sets.
2012-08-21 16:37:17 -07:00
Max Goodman
4208ea88f7 Underline search facets on hover. 2012-08-21 16:37:17 -07:00
Keith Mitchell
3828815524 Try out a hot sort 2012-08-21 14:38:45 -07:00
Keith Mitchell
e89afe9a80 Helper functions should default to the default sort 2012-08-21 14:38:30 -07:00
Keith Mitchell
cc1848b715 Send type_id data to cloudsearch
This minor addition will allow us to combine
different things into a single domain if we so
desire.
2012-08-21 14:38:23 -07:00
Keith Mitchell
a0ef13e4fb Clean up cloudsearch.py
* Domain permutations can be a list of items
* _to_fn() function was redundant
2012-08-21 14:38:16 -07:00
Keith Mitchell
095091dffb promote.py: Need to load the campaign data
In scheduled_campaigns_by_link, a call to PromoCampaign._byID
was referencing data attributes but not requesting data=True
on load.
2012-08-21 14:38:11 -07:00
Neil Williams
30885089bd tdb_sql/Thing: Assume data props should be INSERTed on thing creation.
Previously, setting data props on a thing would result in a SELECT to
determine which data properties already existed, and then a sequence of
INSERTs and UPDATEs (with some batching) to get the database in the
right state.

The account master wasn't too happy with those extra selects, so we
made it so that the app would optimistically UPDATE and if no rows were
changed do INSERTs instead (with appropriate batching as above).

Unfortunately, this greatly increases the number of operations done when
adding new data props, such as at thing creation time, and on some
tables that's almost entirely all of the workload.

This patch takes advantage of the fact that we know no data attributes
will exist at thing creation time and therefore we can blindly INSERT
without doing UPDATEs or SELECTs first to try and reduce the number of
extraneous operations we do.
2012-08-21 14:23:13 -07:00
bsimpson63
2c91a2a18e Cached queries for user reported things. 2012-08-21 14:19:32 -04:00
shlurbee
15d60fb82d Fixes bugs in promotion code:
Updates an occurrence of "index" that should have been changed to campaign._id
during the campaign thing reads change. This fixes two bugs:

(1) Campaigns were being incorrectly marked with "update failed" when edited
by an admin or sponsor even though the update was successful.

(2) Campaigns were not being automatically marked as freebies when edited by
an admin or sponsor. (These have to be set as freebies in self-serve because
they are billed separately.)

This change also checks for an empty user string so the update function can
be run in paster shell.
2012-08-21 14:19:24 -04:00
Max Goodman
7205f9ae03 Spruce up search pages. 2012-08-20 17:34:19 -07:00
Max Goodman
6680a74d78 Add subreddit interest bar to /reddits. 2012-08-20 17:34:19 -07:00
Max Goodman
613b27de9e Add subreddit interest discovery bar. 2012-08-20 17:34:19 -07:00
Max Goodman
df628d4368 Make cloudsearch facet params more configurable. 2012-08-20 17:18:00 -07:00
Max Goodman
754c35da53 Move "lookup" spotlight box var out of template. 2012-08-20 17:18:00 -07:00
Max Goodman
6dfb00105b Refactor spotlight item param names to be more generic. 2012-08-20 17:18:00 -07:00