Commit 7a559d31 authored by Leigh Stoller's avatar Leigh Stoller

Slightly better handing for GPO users who are not a member of

any projects at the GPO portal; redirect them after login to a page that
tells them they have no project membership. We already not giving them
any menus, but add back in the right side dropdown that has their login
name, but only a logout button.

Eventually we want to make it easier for them to promote to real user,
but that needs a bit more UI work. I just made a ticket for it, #377.
parent 283fc466
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -55,6 +55,9 @@ if ($this_user) {
# message there.
header("Location: $APTBASE/myaccount.php");
}
elseif ($this_user->IsNonLocal() && $this_user->webonly()) {
header("Location: $APTBASE/nomembership.php");
}
elseif (Instance::UserHasInstances($this_user)) {
header("Location: $APTBASE/user-dashboard.php");
}
......
<?php
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
chdir("..");
include("defs.php3");
chdir("apt");
include("quickvm_sup.php");
$page_title = "Invite a User";
RedirectSecure();
$this_user = CheckLoginOrRedirect(CHECKLOGIN_NONLOCAL|CHECKLOGIN_WEBONLY);
NoProjectMembershipError($this_user);
?>
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -478,32 +478,30 @@ echo " <li class='divider'></li>
<a class='btn btn-quickvm-home navbar-btn' href='$PORTAL_MANUAL' target='_blank'>Docs</a>
</li>
";
if ($login_user && ! ($login_status & CHECKLOGIN_WEBONLY)) {
echo "
echo "
<li id='quickvm_actions_menu' class='dropdown apt-left apt-nav-item'>
<a href='#'
class='dropdown-toggle btn btn-quickvm-home navbar-btn'
data-toggle='dropdown'>
$login_uid <b class='caret'></b></a>
<ul class='dropdown-menu'>
<li><a href='myaccount.php'>Manage Account</a></li>
<li><a href='signup.php'>Start/Join Project</a></li>
<li><a href='changepswd.php'>Change Password</a></li>
";
if ($login_user->isActive()) {
echo "
<li><a href='getcreds.php'>Download Credentials</a></li>
<li><a href='ssh-keys.php'>Manage SSH Keys</a></li>
<li class='divider'></li>
<li><a href='logout.php'>Logout</a></li>
";
}
}
echo "
</ul>
</li>
</ul>";
<ul class='dropdown-menu'>\n";
if ($login_user && ! ($login_status & CHECKLOGIN_WEBONLY)) {
echo "
<li><a href='myaccount.php'>Manage Account</a></li>
<li><a href='signup.php'>Start/Join Project</a></li>
<li><a href='changepswd.php'>Change Password</a></li>";
if ($login_user->isActive()) {
echo "
<li><a href='getcreds.php'>Download Credentials</a></li>
<li><a href='ssh-keys.php'>Manage SSH Keys</a></li>
<li class='divider'></li>";
}
}
echo "<li><a href='logout.php'>Logout</a></li>";
echo "</ul>
</li>
</ul>";
echo "</div></div>";
}
......
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