<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_preview_permission(self, request, obj=None):
 """ Return `True` if the user has permissions to preview a publishable item. NOTE: this method does not actually change who can or cannot preview any particular item, just whether to show the preview link. The real dcision is made by a combination of: - `PublishingMiddleware` which chooses who can view draft content - the view code for a particular item, which may or may not render draft content for a specific user. :param request: Django request object. :param obj: The object the user would preview, if permitted. :return: Boolean. """

        # User who can publish always has preview permission.
        if self.has_publish_permission(request, obj=obj):
            return True
        user_obj = request.user
        if not user_obj.is_active:
            return False
        if user_obj.is_staff:
            return True
        return False