Fix logic error allowing users to assign flair to others.

This commit is contained in:
Logan Hanks
2011-10-20 18:58:34 -07:00
parent 769b0666c4
commit c66c995803

View File

@@ -2138,12 +2138,14 @@ class ApiController(RedditController):
g.log.debug('flair self-assignment not permitted')
return
# Ignore given text if user doesn't have permission to customize it.
if (not c.site.is_moderator(c.user) and not c.user_is_admin
and not flair_template.text_editable):
text = None
if not c.site.is_moderator(c.user) and not c.user_is_admin:
# Ignore user choice if not an admin or mod.
user = c.user
# Ignore given text if user doesn't have permission to customize it.
if not flair_template.text_editable:
text = None
if not text:
text = flair_template.text