Commit Graph

1903 Commits

Author SHA1 Message Date
Andre D
5fe3cc30de subreddit: Error on invalid revision. 2012-09-28 14:27:57 -07:00
Andre D
871ff7eb0c subreddit: Add missing error on stylesheet conflict. 2012-09-28 14:27:57 -07:00
Andre D
bfdcff6008 subreddit: Add missing error fields and checks. 2012-09-28 14:27:57 -07:00
Andre D
6682a4f796 subreddit: Check the correct value of length for prevstyle. 2012-09-28 14:27:57 -07:00
Andre D
bf05f4bb79 validator: Correct BAD_NUMBER when min or max was None. 2012-09-28 14:27:57 -07:00
Andre D
34ca0edd21 wiki: Assume force if previous value is None. This allows clients that don't send the previous IDs to skip conflict detection and update the wikified text fields. This allows for backwards compatibility, as well as making stylesheet updating not require an extra lookup. 2012-09-28 14:27:57 -07:00
Ricky Ramirez
5036af9b9c Use monospaced fonts for the stylesheet editor. 2012-09-27 16:54:55 -07:00
Neil Williams
09de367263 Subreddit CSS: Make /about/stylesheet show unminified CSS.
This is for non-moderators to be able to view the commented / unminified
CSS so they can learn / cherry-pick bits from it.

This uses highlight.js from
isagalaev/highlight.js@45c03cd045.
2012-09-27 16:01:02 -07:00
Andre D
4b1651fea4 subreddit: UploadedImage error call should have form_id specified. 2012-09-27 16:01:02 -07:00
Keith Mitchell
c0ceeda904 toolbar: Tighten restrictions on when it's usable
/tb/ links are sadly used by spammers as a URL shortener.
Since their primary benefit is giving users easy access to
voting and the comments, it can be changed to only be shown
to logged in users, and only if they've opted in to toolbar
links. Other visitors of /tb/ will get directed to the comments
for the link (providing easy access to the link itself, should
they desire to continue)
2012-09-26 14:39:35 -07:00
Logan Hanks
a784a388c5 Add "vote" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
9a323ac778 Add "edit" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
ad86b4b5b9 Add "modconfig" oauth2 scope. 2012-09-26 13:29:44 -07:00
Max Goodman
d89b069330 Fix authorization page sizing for large scope lists. 2012-09-26 13:29:44 -07:00
Logan Hanks
c60f6378ba Add "privatemessages" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
0dc3405b24 Add "modposts" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
2226cae098 Add "read" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
d12a0c598c Remove oauth2 support from POST_setflairenabled. 2012-09-26 13:29:44 -07:00
Logan Hanks
e367eb00a6 Return is_mod in /api/v1/me. 2012-09-26 13:29:44 -07:00
Logan Hanks
397ab513a3 Add "modtraffic" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
342b085f2c Rename "moderateflair" oauth2 scope to "modflair". 2012-09-26 13:29:44 -07:00
Logan Hanks
808ae9bd25 Add "subscribe" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
ee87d2de54 Add "submit" oauth2 scope. 2012-09-26 13:29:44 -07:00
Logan Hanks
4cf967a69e Rename "myreddits" oauth2 scope to "mysubreddits". 2012-09-26 13:29:44 -07:00
Logan Hanks
6c856d9b51 Refactor oauth2 scopes and add subreddits to them. 2012-09-26 13:29:44 -07:00
Logan Hanks
ae7435c78b Apply bearer token before calling controller's pre().
This is necessary to add oauth support to controllers that use c.user to
enforce permissions.
2012-09-26 13:29:43 -07:00
Logan Hanks
303b116bf1 Add error code for VModhash errors. 2012-09-26 13:29:43 -07:00
Keith Mitchell
983baa0214 Check reverse_moderator_ids of the wrapped Account 2012-09-26 13:29:41 -07:00
Neil Williams
b2ad131cbb Subreddit CSS: Store subreddit CSS on S3 and minify it.
This means that stylesheets can have all the advantages of other static
files, such as not having session cookies in the request. In addition,
it also means that subreddit objects are drastically smaller in memcache
which saves internal bandwidth and increases cache capacity.
2012-09-25 15:39:06 -07:00
Neil Williams
bfd2372e63 ErrorController: Send status code even when not rendering.
Previously, if the current extension were not in allowed_render_styles,
the error's HTTP status code would be swallowed and turned into a 200.
This meant that 404ing stylesheets were actually sending back the text
"404" as an "OK" stylesheet.
2012-09-25 15:39:06 -07:00
Neil Williams
5c2679fbf6 static: Use rCSSMin to minify CSS files during static file compilation.
This shows a 10% reduction in size of the compressed results on the
current reddit.css stylesheet.
2012-09-25 13:01:37 -07:00
Neil Williams
332277f572 POST_site_admin: move sidebar/description so they're set on creation.
A previous change made it so that the sidebar and description fields
would not be set properly on subreddit creation but only on edit.
2012-09-25 13:01:37 -07:00
Neil Williams
21b33b5a06 vote: Store vote details for 90 days. 2012-09-24 14:33:32 -07:00
Andre D
dceca6edbc subreddit: Correct incorrect modaction site 2012-09-24 14:29:19 -07:00
Keith Mitchell
c53b5e7b75 unicode objects don't have a cssText attr 2012-09-24 14:07:38 -07:00
Arun Debray
87a6a29e8c Fix /user/ page paths in the API documentation.
To view information about a user, one must visit
/user/{username}/overview.json, etc., but the documentation had said one
should visit /{username}/overview.json, etc.
2012-09-24 14:07:13 -07:00
Neil Williams
34417ee6ef vote: Gracefully degrade when no vote details are available. 2012-09-24 14:07:13 -07:00
Max Goodman
7621afe962 Apply stylesheets client-side in a safer manner. 2012-09-19 16:08:14 -07:00
Neil Williams
5dba8a65ae builders: Rework SimpleBuilder for use with simple psuedo-things. 2012-09-19 11:29:39 -07:00
Neil Williams
a6e725502e vote: Remove old tdb_cassandra.Relation-based vote infrastructure. 2012-09-19 11:29:19 -07:00
Neil Williams
34d93cac28 vote: Add get_details method to fetch vote details. 2012-09-19 11:28:52 -07:00
Neil Williams
57f20be12e vote: Cut CommentVote reads over to CommentVotesByAccount.
This patch makes us use the new DenormalizedRelation-based
CommentVotesByAccount for reads.

This continues dual-writing of votes to LinkVote/CommentVote.
2012-09-19 11:28:47 -07:00
Neil Williams
56975f7fed wiki: Cache wikified subreddit text on subreddit object.
This is a short-term solution until we figure out a better place to
store this information.  Currently, the property-getters are generating
way too much traffic to Cassandra and we should continue using the old
storage location for the latest revision.
2012-09-19 11:28:34 -07:00
Andre D
57fb1edd3f Subreddit: Handle previous revision failures 2012-09-19 11:27:41 -07:00
Andre D
a2747b4241 Subreddit: Add missing new wiki related fields 2012-09-19 11:27:34 -07:00
Keith Mitchell
a72a562fe0 Remove unused r2.config.utils
It was at some point moved to r2.lib.utils,
as all the functionality of r2.config.utils is
duplicated exactly in r2.lib.utils
2012-09-17 14:26:40 -07:00
Max Goodman
f50de2d6d4 submit: Add VModhash check. 2012-09-17 14:26:40 -07:00
Max Goodman
c45f0b5328 Remove name availability indicator when updating.
Thanks for the heads-up /u/davidjayhawk!
2012-09-14 17:08:11 -07:00
Max Goodman
fbc8eea552 Whitespace. 2012-09-14 17:08:11 -07:00
Neil Williams
2171b300a8 vote: Fix VoteDetailsByThing aggregating backwards.
Voter and votee were swapped. Déjà vu!
2012-09-14 17:08:10 -07:00