Commit 2394a940 authored by Leigh Stoller's avatar Leigh Stoller

Allow foreign admins to see user-dashboard and show-project.

parent bae637b8
......@@ -56,7 +56,7 @@ function CheckPageArgs()
SPITAJAX_ERROR(-1, "Unknown target pid");
return -1;
}
if (!ISADMIN() &&
if (!ISADMIN() && !ISFOREIGN_ADMIN() &&
!$target_project->AccessCheck($this_user, $TB_PROJECT_READINFO)) {
SPITAJAX_ERROR(-1, "Not enough permission");
return -1;
......
......@@ -44,7 +44,7 @@ $optargs = RequiredPageArguments("project", PAGEARG_PROJECT);
SPITHEADER(1);
if (!ISADMIN() &&
if (!ISADMIN() && !ISFOREIGN_ADMIN() &&
!$project->AccessCheck($this_user, $TB_PROJECT_READINFO)) {
SPITUSERERROR("You do not have permission to view this information!");
return;
......
......@@ -59,7 +59,7 @@ function CheckPageArgs()
if ($uid == $this_user->uid())
return 0;
if (!ISADMIN() &&
if (!ISADMIN() && !ISFOREIGN_ADMIN() &&
!$target_user->AccessCheck($this_user, $TB_USERINFO_READINFO)) {
SPITAJAX_ERROR(-1, "Not enough permission");
return -1;
......@@ -192,7 +192,7 @@ function Do_UsageSummary()
"phours" => $phours,
"weekpnodes" => $weekpcount,
"weekphours" => $weekphours,
"monthpnodes" => $monthpnodes,
"monthpnodes" => $monthpcount,
"monthphours" => $monthphours,
"rankdays" => 30,
"rank" => $rank,
......
......@@ -49,7 +49,7 @@ if (! isset($target_user)) {
# Verify that this uid is a member of one of the projects that the
# target_uid is in. Must have proper permission in that group too.
#
if (!$isadmin &&
if (!$isadmin && !ISFOREIGN_ADMIN() &&
!$target_user->AccessCheck($this_user, $TB_USERINFO_READINFO)) {
SPITUSERERROR("You do not have permission to view this information!");
return;
......
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