Commit 7b6f6150 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor additions for controlling APT/Cloud free extensions.

parent 98ea85cf
......@@ -138,6 +138,7 @@ CREATE TABLE `apt_instances` (
`user_lockdown` tinyint(1) NOT NULL default '0',
`extension_code` varchar(32) default NULL,
`extension_reason` mediumtext,
`extension_adminonly` tinyint(1) NOT NULL default '0',
`servername` tinytext,
`monitor_pid` int(11) default '0',
`rspec` mediumtext,
......
......@@ -154,6 +154,7 @@ INSERT INTO sitevariables VALUES ('storage/simultaneous_ro_datasets',NULL,'0','I
INSERT INTO sitevariables VALUES ('aptlab/message',NULL,'','Message to display at the top of the APT interface',0);
INSERT INTO sitevariables VALUES ('cloudlab/message',NULL,'','Message to display at the top of the CloudLab interface',0);
INSERT INTO sitevariables VALUES ('aptui/autoextend_maximum',NULL,'7','Maximum number of days requested that will automaticaly be granted; zero means only admins can extend an experiment.',0);
INSERT INTO sitevariables VALUES ('aptui/autoextend_maxage',NULL,'14','Maximum age (in days) of an experiment before all extension requests require admin approval.',0);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
......
#
# APT Stuff.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_instances", "extension_adminonly")) {
DBQueryFatal("alter table apt_instances add ".
" `extension_adminonly` tinyint(1) NOT NULL default '0' ".
" after extension_reason");
}
my $var = "aptui/autoextend_maxage";
if (!TBSiteVarExists($var)) {
my $desc = "Maximum age (in days) of an experiment before all ".
"extension requests require admin approval.";
my $defval = "14";
DBQueryFatal("INSERT INTO sitevariables VALUES ".
"('$var',NULL,'$defval','$desc',0)");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment