from rest_framework.permissions import BasePermission


class HasAuthorizationHeader(BasePermission):
    def has_permission(self, request, view):
        return 'Authorization' in request.headers

class ItsAdminToken(BasePermission):
    def has_permission(self,request,view):
        return request.user.is_superuser

class ItsAdminGroup(BasePermission):
    def has_permission(self, request, view):
        return request.user.groups.filter(name= 'admin_soft')