mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Require mail permission to view /about/muted and unmute
This commit is contained in:
@@ -857,6 +857,10 @@ class ApiController(RedditController):
|
||||
required_perms.append('wiki')
|
||||
else:
|
||||
required_perms.append('access')
|
||||
# ability to unmute requires access and mail permissions
|
||||
if type == 'muted':
|
||||
required_perms.append('mail')
|
||||
|
||||
if (not c.user_is_admin
|
||||
and (type in self._sr_friend_types
|
||||
and not container.is_moderator_with_perms(
|
||||
|
||||
@@ -1741,7 +1741,8 @@ class UserListListingController(ListingController):
|
||||
self.listing_cls = BannedListing
|
||||
|
||||
elif where == 'muted':
|
||||
if not has_mod_access:
|
||||
if not (has_mod_access and
|
||||
c.site.is_moderator_with_perms(c.user, 'mail')):
|
||||
abort(403)
|
||||
self.listing_cls = MutedListing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user