#! /usr/bin/perl -T
use strict;
use warnings;
use utf8;

use lib '../include';
use itkaclcommon;

itkaclcommon::init();
itkaclcommon::check_csrf_token();

my $entry = $itkaclcommon::cgi->param('entry');
my $entity = $itkaclcommon::cgi->param('entity');
my $entity_type = $itkaclcommon::cgi->param('entity_type');

$itkaclcommon::dbh->do('DELETE FROM aclentries WHERE object=? AND entity_type=? AND entity=?', undef,
    $entry, $entity_type, $entity)
	or die "Couldn't do deletion";

print $itkaclcommon::cgi->redirect("view.pl?entry=$entry");

