""" Permission classes. """
from rest_framework.permissions import BasePermission


class IsSuperuser(BasePermission):
    """ Allows access only to superusers. """

    def has_permission(self, request, view):
        return request.user and request.user.is_superuser
