Commit 0693b078 authored by Leigh Stoller's avatar Leigh Stoller

Minor changes to allow STUDLY users to use adminonly aggregates.

parent 24acc12d
#!/usr/bin/perl -w
#
# Copyright (c) 2008-2018 University of Utah and the Flux Group.
# Copyright (c) 2008-2019 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -885,7 +885,8 @@ foreach my $aggregate_urn (@aggregate_urns) {
}
}
if ($aptaggregate->adminonly() &&
!(defined($this_user) && $this_user->IsAdmin())) {
!(defined($this_user) &&
($this_user->IsAdmin() || $this_user->stud()))) {
$slice->Delete();
$instance->Delete();
UserError("Only administrators may use the $aggregate_name cluster.");
......
<?php
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
# Copyright (c) 2000-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -399,6 +399,8 @@ function SPITFORM($formfields, $newuser, $errors)
echo " window.CANCOPY = $cancopy;\n";
$isadmin = (isset($this_user) && ISADMIN() ? 1 : 0);
echo " window.ISADMIN = $isadmin;\n";
$isstud = (isset($this_user) && STUDLY() ? 1 : 0);
echo " window.ISSTUD = $isstud;\n";
$multisite = (isset($this_user) && $ISCLOUD ? 1 : 0);
echo " window.MULTISITE = $multisite;\n";
$doconstraints = $TBMAINSITE;
......
......@@ -2344,7 +2344,7 @@ $(function ()
break;
}
}
if (found || isadmin)
if (found || isadmin || window.ISSTUD)
{
$(this).prop('disabled', false);
if (allowed.length == 1) {
......
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