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

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

itkaclcommon::init();

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

$itkaclcommon::dbh->do('UPDATE aclentries SET comment=? WHERE object=? AND entity_type=? AND entity=?', undef,
    $comment, $entry, $entity_type, $entity)
	or die "Couldn't change comment";

print $itkaclcommon::cgi->header(-type=>'text/plain');
print "OK\n";
