def METHOD_NAME(context, data_dict):
    if context.get('resource'):
        return authz.is_authorized('resource_delete', context, {})
    if context.get('resource_view'):
        return authz.is_authorized('resource_delete', context, {'id': context['resource_view'].resource_id})
    resource_id = data_dict.get('resource_id')
    if not resource_id:
        resource_view = context['model'].ResourceView.get(data_dict['id'])
        if not resource_view:
            raise logic.NotFound(_('Resource view not found, cannot check auth.'))
        resource_id = resource_view.resource_id
    return authz.is_authorized('resource_delete', context, {'id': resource_id})