<reponame>JorgeOsorio97/CRide-platzi
"""User permission."""

# Django REST Framework
from rest_framework.permissions import BasePermission 

class IsAccountOwner(BasePermission):
    """Allow access only to account object owned by the requesting user."""

    def has_object_permission(self, request, view, obj):
        """Chck object and user are the same"""
        return request.user == obj
"""User permission."""

# Django REST Framework
from rest_framework.permissions import BasePermission 

class IsAccountOwner(BasePermission):
    """Allow access only to account object owned by the requesting user."""

    def has_object_permission(self, request, view, obj):
        """Chck object and user are the same"""
        return request.user == obj
User permission. # Django REST Framework Allow access only to account object owned by the requesting user. Chck object and user are the same