<s> from __future__ import unicode_literals <EOL> def has_permission ( user , proposal , speaker = False , reviewer = False ) : <EOL> """<STR_LIT>""" <EOL> if user . is_superuser : <EOL> return True <EOL> if speaker : <EOL> if user == proposal . speaker . user or proposal . additional_speakers . filter ( user = user ) . exists ( ) : <EOL> return True <EOL> if reviewer : <EOL> if user . groups . filter ( name = "<STR_LIT>" ) . exists ( ) : <EOL> return True <EOL> return False </s>
