defhas_permission(user,proposal,speaker=False,reviewer=False):""" Returns whether or not ther user has permission to review this proposal, with the specified requirements. If ``speaker`` is ``True`` then the user can be one of the speakers for the proposal. If ``reviewer`` is ``True`` the speaker can be a part of the reviewer group. """ifuser.is_superuser:returnTrueifspeaker:if(user==proposal.speaker.userorproposal.additional_speakers.filter(user=user).exists()):returnTrueifreviewer:ifuser.groups.filter(name="reviewers").exists():returnTruereturnFalse