Commit fb01244f authored by Leigh Stoller's avatar Leigh Stoller

Auto redirect admin users to private page instead of less useful public

page.
parent a5ed27d0
<?php
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -97,9 +97,9 @@ if ($slice->monitor_pid()) {
$rows[] = array("Monitor PID" => $slice->monitor_pid());
}
if ($slice->publicid()) {
$url = "$TBDOCBASE/showslicepub.php?publicid=" . $slice->publicid();
$url = "$TBBASE/showslicepub.php?publicid=" . $slice->publicid();
$rows[] = array("Public URL" => "<a href='$url'>http:// ...</a>");
$rows[] = array("Public URL" => "<a href='$url'>https:// ...</a>");
}
if (($manifest = $slice->GetManifest())) {
$popups[] = GeneratePopupDiv("manifest$manifestidx", $manifest);
......
<?php
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -26,14 +26,14 @@ include_once("geni_defs.php");
include("table_defs.php");
#
# Public info, if you know the public token for the slice.
# Get current user.
#
$reqargs = RequiredPageArguments("publicid", PAGEARG_STRING);
$this_user = CheckLogin($check_status);
#
# Standard Testbed Header
# Public info, if you know the public token for the slice.
#
PAGEHEADER("Geni Slice");
$reqargs = RequiredPageArguments("publicid", PAGEARG_STRING);
$slice = GeniSlice::LookupByPublicID("cm", $publicid);
if (!$slice) {
......@@ -41,6 +41,20 @@ if (!$slice) {
}
$slice_idx = $slice->idx();
#
# Send admins to the non-public page.
#
if (ISADMIN()) {
header("Location: ".
"$TBBASE/showslice.php?slice_idx=${slice_idx}&showtype=cm");
return;
}
#
# Standard Testbed Header
#
PAGEHEADER("Geni Slice");
function GeneratePopupDiv($id, $text) {
return "<div id=\"$id\" ".
"style='display:none;width:700;height:400;overflow:auto;'>\n" .
......
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