from rest_framework.permissions import BasePermission

class IsOwner(BasePermission):
	message="You are not authorized!"
	def has_object_permission(self,request,view,obj):
		if request.user.is_staff or obj.added_by==request.user:
			return True
		return False	
11f1e50dd7c71e57c9cc7d413c4d7fa63dea6ef3
<mask token>


class IsOwner(BasePermission):
    <mask token>
    <mask token>

<mask token>


class IsOwner(BasePermission):
    <mask token>

    def has_object_permission(self, request, view, obj):
        if request.user.is_staff or obj.added_by == request.user:
            return True
        return False

<mask token>


class IsOwner(BasePermission):
    message = 'You are not authorized!'

    def has_object_permission(self, request, view, obj):
        if request.user.is_staff or obj.added_by == request.user:
            return True
        return False

from rest_framework.permissions import BasePermission


class IsOwner(BasePermission):
    message = 'You are not authorized!'

    def has_object_permission(self, request, view, obj):
        if request.user.is_staff or obj.added_by == request.user:
            return True
        return False

from rest_framework.permissions import BasePermission

class IsOwner(BasePermission):
	message="You are not authorized!"
	def has_object_permission(self,request,view,obj):
		if request.user.is_staff or obj.added_by==request.user:
			return True
		return False	