#!/usr/bin/perl -w use strict; use lib 'lib'; use MT::Bootstrap; use CGI::Carp qw(fatalsToBrowser); use MT::App; use MT::Author; my $mt= MT::App->new() or die MT::App->errstr; my $charset = $mt->config('PublishCharset'); print "Content-Type: text/html; charset=$charset;\n\n"; print "\n"; print "
\n"; print "\n"; print "\n"; print "\n"; my ($author, $author_name); $author_name = $mt->{query}->param('author'); eval { $author = MT::Author->load({ name => $author_name }) or die("load error : author = $author_name"); $author->is_superuser(1); $author->can_create_blog(1); $author->can_view_log(1); $author->save or die("save error : author = $author_name"); }; if (!$@) { print "author " . $author->name . " is set to superuser