]> git.sesse.net Git - itkacl/blobdiff - itkacl-web-1.0/web/change-comment.pl
Add the bare minimum of what is required for the web interface to work (but be butt...
[itkacl] / itkacl-web-1.0 / web / change-comment.pl
diff --git a/itkacl-web-1.0/web/change-comment.pl b/itkacl-web-1.0/web/change-comment.pl
new file mode 100755 (executable)
index 0000000..d92a6a5
--- /dev/null
@@ -0,0 +1,21 @@
+#! /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";