Remove feature flag for modmail muting

This commit is contained in:
MelissaCole
2015-09-28 16:53:47 -07:00
parent 63a7d8b8f6
commit 3ca7e7ca55
5 changed files with 8 additions and 26 deletions

View File

@@ -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

View File

@@ -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'):

View File

@@ -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':

View File

@@ -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"))

View File

@@ -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