Commit Graph

6374 Commits

Author SHA1 Message Date
MelissaCole
68ed9767d8 Create /subreddits/quarantine
This lists all of the subreddits that have been quarantined.
2015-08-05 13:16:57 -07:00
Matt Lee
6c76c86817 Quarantine: Don't allow to be targeted by ads. 2015-08-05 13:16:56 -07:00
Florence Yeun
961de1367f Quarantine: Disable thumbnail scraping 2015-08-05 13:16:56 -07:00
Matt Lee
bca4cec70b Quarantine: Hide thumbnails unless viewing within subreddit. 2015-08-05 13:16:56 -07:00
Matt Lee
c91d3da15e Quarantine: Add stamp to posts from quarantined subreddits. 2015-08-05 13:16:56 -07:00
Matt Lee
a85ab8c830 Quarantine: Redirect to an error page if user can't view. 2015-08-05 13:16:56 -07:00
Matt Lee
1c7fe81b6a Quarantine: Add check against quarantine flag to Subreddit.can_view. 2015-08-05 13:16:56 -07:00
Matt Lee
3395415d7e Quarantine: Don't allow in r/random.
Replaces the check against the allow_random property, which was a quick hack to
deal with a specific subreddit.  Also removes allow_random from the _defaults dict
2015-08-05 13:16:56 -07:00
MelissaCole
111d9f8491 Exclude quarantined subreddits from /explore 2015-08-05 13:16:56 -07:00
MelissaCole
e739f98ba1 Require authentication for media embeds 2015-08-05 13:16:56 -07:00
MelissaCole
930f1cd5fe Exclude quarantined subreddits from embeds 2015-08-05 13:16:56 -07:00
MelissaCole
31970a54f4 Create 'quarantine' subreddit attribute
This attribute can only be set by a user in admin mode. If a non-admin user
creates a subreddit, it defaults to False. If a non-admin user is editing
the subreddit settings, the quarantine attribute defaults to the previous
value.
2015-08-05 13:16:56 -07:00
Chad Birch
61f5d0e28f Allow manually excluding subreddits from /r/random 2015-08-05 13:16:41 -07:00
umbrae
83fde541c2 Remove no-longer-necessary flag newsletter 2015-08-05 13:16:37 -07:00
xiongchiamiov
ef0ead4bd8 Feature flags: allow overriding of subreddit
Just like with user-overriding, sometimes we want to be able to check whether a
feature flag is on for a specific subreddit while in a non-request context.
2015-08-05 09:57:15 -07:00
xiongchiamiov
e76e9e2189 Feature flags: remove is_enabled_for()
The function essentially did the same thing as `is_enabled()`, but with
overriding the user and not also checking the subreddit, subdomain, or oauth
client.  The former is easily handled with default args, and the latter has
actually potentially been an issue - if you needed to override the user, you
lost the effect of any of those on the feature flag.
2015-08-05 09:57:14 -07:00
Florence Yeun
43e04c3d48 Fix KeyError for banned subreddit 2015-08-04 16:33:35 -07:00
weffey
0bcb4aa3da Turn subreddit ban into Y/N
Turn subreddit ban into Y/N, removing the possibility for one click accidental bans.

Once a subreddit is banned, provides an option to override public ban message.

Adds a counter to count how many times a subreddit has been banned.
2015-08-04 16:33:30 -07:00
David Wick
69a0384054 embed.js: Fix race condition with preview
This was mainly a problem in dev with uncompressed scripts.
`rembeddit#init` was being invoke on script load without the callback before
the `'opened.r.popup'` event fired and setup the embed for previewing.
2015-08-04 16:07:23 -07:00
David Wick
d32dae6f5a sponsored.js: Show error when trying to add files which are too large 2015-08-04 16:07:23 -07:00
David Wick
2c32a9efba Revert "Add PromotedLink.absolute_url"
Using instances of `PromotedLink` is not recommended.
2015-08-04 16:07:23 -07:00
Brian Simpson
411fb49b02 Use a separate memcache pool for hardcache.
Previously it was part of the main memcache pool, but hardcache uses
keys that are invalid for ascii protocol so it was blocking switching
the main pool to ascii.
2015-08-01 13:42:44 -04:00
Brian Simpson
58daba3184 Main memcache is a CacheChain object.
This got out of sync.
2015-08-01 13:42:44 -04:00
Brian Simpson
e1421c0fb0 app_globals: Rename "memcache" to "memcaches".
This naming got out of sync.
2015-08-01 13:42:44 -04:00
Robert Ditthardt
8fe75df017 cache.py: Add a random delay to memcached retries
This should reduce memcached spam during outages
2015-08-01 13:42:43 -04:00
Brian Simpson
48eacfb036 TransitionalCache: Use the read cache's stats. 2015-08-01 13:42:43 -04:00
Robert Ditthardt
16ee56d1e9 memcached: Up size limit to 2mb
This is a guess, to attempt to lower render cache network in/out
2015-08-01 13:21:04 -04:00
Robert Ditthardt
cc01831b71 memcached: Up max size limit to account for rough estimate of size
differences.

This is partially a guess, but is also based on a 15% stat for
difference between in memory size and pickled size.
2015-08-01 13:20:58 -04:00
Robert Ditthardt
57991d75d3 memcached: Fix accidental method signature mismatch 2015-08-01 13:20:46 -04:00
Robert Ditthardt
8aee0f91d6 memcached: Remove validators from render, page, and perma caches 2015-08-01 13:18:32 -04:00
Robert Ditthardt
a795f8022f memcached: Switch validation behavior for permacache to warn 2015-08-01 13:17:51 -04:00
Robert Ditthardt
9d7d9316a0 Memcached: Implement size check on values
This should relieve the last of the common errors, which are due to
trying to store cache values at sizes greater than 1MB.
2015-08-01 13:13:30 -04:00
Brian Simpson
4c6c4c1069 Move live_config special user setup to the "zookeeper" startup timer. 2015-08-01 13:08:12 -04:00
Brian Simpson
a101f376c0 LabeledMulti._byID: return correct object when lookup fails.
Previously was returning None, but when looking up a list of ids
it should return an empty list or empty dict.
2015-08-01 12:33:05 -04:00
Chad Birch
b1173027e0 Subreddit bans: add duration and reason to mod log 2015-08-04 14:04:48 -06:00
Neil Layne
5fb42b9c19 Make /w/toolbox a "rawcode" page type.
This change will save reddit processing and bandwidth by not rendering
/r/sub/w/toolbox markdown (it's JSON data), and by not sending
`content_html` for JSON requests.  See also:
3cf7c85346
2015-08-04 14:04:43 -06:00
Neil Williams
fcdd4f7afc Fix js_config breaking when tracker_url not configured.
The pageview pixel code expects various things (the base URL, the secret
token, etc.) to be configured. Other places (like base.html) always
check if `g.tracker_url` is valid before generating the pageview pixel.
This was broken in 1f6a9aa570 when
`js_config()` started calling `get_pageview_pixel_url()`
indiscriminately.  Ouch for poor open source and dev installs.
2015-08-04 10:32:01 -07:00
Kevin O'Connor
c9c43426cc Hide private IPs from account activity for non-admins.
mobile-web keeps cropping up with a bug that puts private IPs into
the account history for users. Best not to worry them with such
things and hide it from their activity page.
2015-08-03 16:19:09 -07:00
David Wick
e49c0a0f00 Allow a user to land on a ad details page even if comments are disabled 2015-08-03 11:29:07 -07:00
David Wick
464707524e Fix multiple ads showing up in 1 listing 2015-08-03 11:29:07 -07:00
David Wick
5e3e1c7fcc Add PromotedLink.absolute_url 2015-08-03 11:29:07 -07:00
David Wick
2aa953c31f Use adserver click urls as an intermidiate redirect when available 2015-08-03 11:29:07 -07:00
Chad Birch
c20eadd86b EventV2: change obfuscatedData to obfuscated_data 2015-08-03 11:55:55 -06:00
Brian Simpson
857cdedde2 Use rgb rather than opacity for things from banned users.
The opacity rule "stacked" onto child messages and comments resulting
in whiter and whiter child elements.
2015-07-31 22:09:23 -04:00
Brian Simpson
7656c7a7bd Add "most-recent" class to the most recent message in a thread. 2015-07-31 22:09:18 -04:00
Chad Birch
5a5db08992 Ban message: don't translate
The translations are currently being done in the context of the
moderator that creates the ban, not the recipient of the message. So if
the moderator has their language set to something different than the
banned user, the message will be in the wrong language for the
recipient.
2015-07-30 17:22:10 -06:00
Pokechu22
c942cef02c Preserve the originally attempted title when resubmitting a link. 2015-07-30 05:28:29 -04:00
Anthony Ma
3ab3329613 comment.compact: Fix link in parent button 2015-07-30 04:42:29 -04:00
Anthony Ma
1f25a23414 comment.compact: Add destination anchor for parent button 2015-07-30 04:42:29 -04:00
Kevin O'Connor
2d00284930 Start counting OAuth clients exceeding rate limits. 2015-07-30 14:54:29 -07:00