From 3ca7e7ca55403bbcf84990f33c2952c4db2bb60f Mon Sep 17 00:00:00 2001 From: MelissaCole Date: Mon, 28 Sep 2015 16:53:47 -0700 Subject: [PATCH] Remove feature flag for modmail muting --- r2/example.ini | 1 - r2/r2/controllers/api.py | 12 ------------ r2/r2/controllers/listingcontroller.py | 2 -- r2/r2/lib/pages/pages.py | 4 +--- r2/r2/lib/pages/things.py | 15 +++++++-------- 5 files changed, 8 insertions(+), 26 deletions(-) diff --git a/r2/example.ini b/r2/example.ini index 1643ea3b3..0876368be 100644 --- a/r2/example.ini +++ b/r2/example.ini @@ -873,4 +873,3 @@ feature_upgrade_cookies = off feature_multireddit_customizations = off # Test if `https_testing_img_test` is loaded with an acceptable HTTPS cert according to users' browsers feature_test_https_certs = off -feature_modmail_muting = off diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index 9428fbd21..208097eb5 100644 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -829,9 +829,6 @@ class ApiController(RedditController): Complement to [POST_friend](#POST_api_friend) """ - if type == 'muted' and not feature.is_enabled('modmail_muting'): - return abort(403, "This feature is not yet enabled") - self.check_api_friend_oauth_scope(type) victim = iuser or nuser @@ -974,9 +971,6 @@ class ApiController(RedditController): Complement to [POST_unfriend](#POST_api_unfriend) """ - if type == 'muted' and not feature.is_enabled('modmail_muting'): - return abort(403, "This feature is not yet enabled") - self.check_api_friend_oauth_scope(type) if type in self._sr_friend_types: @@ -1767,9 +1761,6 @@ class ApiController(RedditController): if not subreddit: abort(403, 'Not modmail') - if not feature.is_enabled('modmail_muting', subreddit=subreddit.name): - return abort(403, "This feature is not yet enabled") - user = message.author_slow if not c.user_is_admin: if not subreddit.is_moderator_with_perms(c.user, 'access', 'mail'): @@ -1807,9 +1798,6 @@ class ApiController(RedditController): if not subreddit: abort(403, 'Not modmail') - if not feature.is_enabled('modmail_muting', subreddit=subreddit.name): - return abort(403, "This feature is not yet enabled") - user = message.author_slow if not c.user_is_admin: if not subreddit.is_moderator_with_perms(c.user, 'access', 'mail'): diff --git a/r2/r2/controllers/listingcontroller.py b/r2/r2/controllers/listingcontroller.py index b1b0cd672..a98cd80d0 100644 --- a/r2/r2/controllers/listingcontroller.py +++ b/r2/r2/controllers/listingcontroller.py @@ -1743,8 +1743,6 @@ class UserListListingController(ListingController): elif where == 'muted': if not has_mod_access: abort(403) - if not feature.is_enabled('modmail_muting'): - abort(403) self.listing_cls = MutedListing elif where == 'wikibanned': diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 5f2ccd52a..0fe1c3398 100644 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -506,9 +506,7 @@ class Reddit(Templated): if is_single_subreddit: if is_moderator_with_perms('access'): buttons.append(NamedButton("banned", css_class="reddit-ban")) - - if (is_moderator_with_perms('access', 'mail') and - feature.is_enabled("modmail_muting")): + if is_moderator_with_perms('access', 'mail'): buttons.append(NamedButton("muted", css_class="reddit-mute")) if is_moderator_with_perms('flair'): buttons.append(NamedButton("flair", css_class="reddit-flair")) diff --git a/r2/r2/lib/pages/things.py b/r2/r2/lib/pages/things.py index 60954a4c0..1ad5c59c4 100644 --- a/r2/r2/lib/pages/things.py +++ b/r2/r2/lib/pages/things.py @@ -269,15 +269,14 @@ class MessageButtons(PrintableButtons): if thing.sr_id: sr = thing.subreddit_slow - if feature.is_enabled('modmail_muting', subreddit=sr.name): - if (sr.is_muted(first_message.author_slow) or - (first_message.to_id and - sr.is_muted(first_message.recipient_slow))): - can_reply = False + if (sr.is_muted(first_message.author_slow) or + (first_message.to_id and + sr.is_muted(first_message.recipient_slow))): + can_reply = False - if (not sr.is_moderator(thing.author_slow) and - sr.is_moderator_with_perms(c.user, 'access', 'mail')): - can_mute = True + if (not sr.is_moderator(thing.author_slow) and + sr.is_moderator_with_perms(c.user, 'access', 'mail')): + can_mute = True if not was_comment and thing.display_author: can_block = False