Commit Graph

6389 Commits

Author SHA1 Message Date
Matt Lee
b53ebded00 Disable image upload form on stylesheet editor. 2015-08-05 13:16:57 -07:00
Matt Lee
468b0551d0 Quarantine: Remove header image upload. 2015-08-05 13:16:57 -07:00
Matt Lee
7cae78b6de Disable upload_sr_image api endpoint for quarantined subreddits. 2015-08-05 13:16:57 -07:00
MelissaCole
38b3bf57aa Add opt out button for quarantined subreddits 2015-08-05 13:16:57 -07:00
MelissaCole
a4e6172fc5 Quarantine Subreddits: Require verified email 2015-08-05 13:16:57 -07:00
Florence Yeun
4868801ada robots.txt: Disallow /quarantine
Restrict crawlers from the quarantined content gate via robots.txt.

Also add robots=noindex,nofollow meta tag to /quarantine page.
2015-08-05 13:16:57 -07:00
Florence Yeun
cd4f3b1f1d robots.txt: Disallow /over18
Restrict crawlers from the NSFW content gate via robots.txt.

Also add robots=noindex,nofollow meta tag to /over18 page.
2015-08-05 13:16:57 -07:00
Matt Lee
3229d27251 Quarantine: Disable share feature on quarantined links. 2015-08-05 13:16:57 -07:00
Matt Lee
2f6a58ae81 Quarantine: Don't allow in /random.
For consistency
2015-08-05 13:16:57 -07:00
Matt Lee
bcf4f0d02a Quarantine: Remove from r/all. 2015-08-05 13:16:57 -07:00
Matt Lee
06a53b2cf5 Quarantine: Add discoverable property. 2015-08-05 13:16:57 -07:00
MelissaCole
ae1296cf87 Create quarantined subreddits content gate
When a user visits a quarantined subreddit for the first time, they are
presented with a content gate so that they can choose to optin to view
the subreddit's content. This preference is remembered per subreddit.
If a user is logged out, it requires the user to log in before validating
that the user has chosen to opt in to view the subreddit.
2015-08-05 13:16:57 -07:00
Matt Lee
48e6429f7e Quarantine: Remove from search results. 2015-08-05 13:16:57 -07:00
MelissaCole
be15d61f89 Disable ads and gilding in quarantined subreddits 2015-08-05 13:16:57 -07:00
MelissaCole
1005737a98 Remove /subreddits/employee from public view
This removes it from api_docs for GET_listing and returns a 404 when not an employee.
2015-08-05 13:16:57 -07:00
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