Commit 15047251 authored by Leigh Stoller's avatar Leigh Stoller

Add a sitevar to control aptui free extension, which says how many days

are granted for free. Better then hardwired to seven in the code, and the
new code treats zero as, no free extensions for mere users.
parent 35446151
......@@ -153,6 +153,7 @@ INSERT INTO sitevariables VALUES ('general/disk_trim_interval',NULL,'0','If non-
INSERT INTO sitevariables VALUES ('storage/simultaneous_ro_datasets',NULL,'0','If set, allow simultaneous read-only mounts of datasets',0);
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);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
......
#
# Site variables.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
my $var = "aptui/autoextend_maximum";
if (!TBSiteVarExists($var)) {
my $desc = "Maximum number of days requested that will automaticaly ".
"be granted; zero means only admins can extend an experiment.";
my $defval = "7";
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