'Returns whether user can view based on permissions and settings'

def is_allowed_to_view(self, user):

    if (self.type in ('public', 'restricted', 'gold_restricted', 'archived')):
        return True
    elif c.user_is_loggedin:
        if (self.type == 'gold_only'):
            return (user.gold or user.gold_charter or self.is_moderator(user) or self.is_moderator_invite(user))
        return (self.is_contributor(user) or self.is_moderator(user) or self.is_moderator_invite(user))
