      Allows access only to authenticated users.
      """
  
      def has_permission(self, request, view):
          return request.user and request.user.is_authenticated()
  
  
  class IsAdminUser(BasePermission):
      """
      Allows access only to admin users.
 
</s> remove             request.user.is_authenticated()
 </s> add             is_authenticated(request.user) </s> remove             (request.user.is_authenticated() or not self.authenticated_users_only) and
 </s> add             (is_authenticated(request.user) or not self.authenticated_users_only) and </s> remove         if request.user.is_authenticated():
 </s> add         if is_authenticated(request.user): </s> remove         if request.user.is_authenticated():
 </s> add         if is_authenticated(request.user):
        return request.user and is_authenticated(request.user)
      Allows access only to authenticated users.
      """
  
      def has_permission(self, request, view):
        return request.user and is_authenticated(request.user)
  
  
  class IsAdminUser(BasePermission):
      """
      Allows access only to admin users.
keep keep keep keep replace keep keep keep keep keep
 Access `request.user.is_authenticated` as property not method, under Django 1.10+ (#4358)

* For Django >=1.10 use user.is_authenticated, not user.is_authenticated() 
rest_framework/permissions.py