'Can the user edit the document?'

def _allows_edit(self, user):

    if (not self.current_revision):
        return True
    locale = self.locale
    if (_is_leader(locale, user) or _is_reviewer(locale, user)):
        return True
    return user.has_perm('wiki.change_document')
