Commit Graph

6401 Commits

Author SHA1 Message Date
Matt Lee
d9ffad5bcf Add quarantine notice to sidebar.
Wraps the opt-out button in a box with some messaging.  Also moves the
opt-out above the subscribe button per the latest design specs.
2015-08-05 13:16:58 -07:00
MelissaCole
6714b63d9f Quarantined optins: Include schema args for cassandra 2015-08-05 13:16:58 -07:00
MelissaCole
21c3a1d2a3 Exclude quarantine from api_docs 2015-08-05 13:16:58 -07:00
Matt Lee
62914fbe8d ReadNext: Use updated NSFW stamp style. 2015-08-05 13:16:58 -07:00
Matt Lee
1cdf540a94 Add NSFW and Quarantined stamps to comments on profile pages. 2015-08-05 13:16:58 -07:00
Matt Lee
9084cff6f9 Quarantine: Update stamp display text. 2015-08-05 13:16:58 -07:00
Matt Lee
4f9baf5732 Update NSFW and Quarantine stamp styles. 2015-08-05 13:16:58 -07:00
Matt Lee
6d5bb543c4 Add content warning stamps to moderator list. 2015-08-05 13:16:58 -07:00
Matt Lee
b07d1f4c6b Quarantine: Disable share api endpoint. 2015-08-05 13:16:58 -07:00
Florence Yeun
b601c465c9 Quarantine: Remove disabled subreddit settings
Remove two disabled options from the subreddit settings page for
quarantined subreddits:
1. allow this subreddit to be included /r/all
2. show thumbnail images of content

These settings are stored independently of the quarantine state.
2015-08-05 13:16:58 -07:00
Matt Lee
9a643e2a0c Don't display header image if quarantined. 2015-08-05 13:16:57 -07:00
Matt Lee
f6f56a0792 Disable images in quarantined subreddit stylesheets.
When a subreddit is marked as quarantined, reparse their stylesheet with all image references replaced with a blank png.
2015-08-05 13:16:57 -07:00
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