mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
Moderators: Check spam status for demote / permission change
This commit is contained in:
committed by
Chad Birch
parent
14c4b0177b
commit
eea87be65d
@@ -623,6 +623,8 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
"""
|
||||
if type in self._sr_friend_types:
|
||||
container = c.site
|
||||
if c.user._spam:
|
||||
return
|
||||
else:
|
||||
container = VByName('container').run(container)
|
||||
if not container:
|
||||
@@ -677,6 +679,9 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
if form.has_errors('permissions', errors.INVALID_PERMISSIONS):
|
||||
return
|
||||
|
||||
if c.user._spam:
|
||||
return
|
||||
|
||||
type, permissions = type_and_permissions
|
||||
update = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user