head	1.29;
access;
symbols
	TIGRIS_1_1_0RC2:1.26.2.1.4.1
	TIGRIS_1_1_0RC1:1.26.2.1.4.1
	TIGRIS_1_1:1.26.2.1.4.1.0.2
	TIGRIS_1_0_8:1.26.2.1.4.1
	TIGRIS_1_0_8RC3:1.26.2.1.4.1
	TIGRIS_1_0_8RC2:1.26.2.1.4.1
	TIGRIS_1_0_8RC1:1.26.2.1.4.1
	TIGRIS_1_0_7:1.26.2.1.4.1
	TIGRIS_1_0_7RC3:1.26.2.1.4.1
	TIGRIS_1_0_7RC2:1.26.2.1.4.1
	TIGRIS_1_0_7RC1:1.26.2.1.4.1
	TIGRIS_1_0_6:1.26.2.1
	TIGRIS_1_0_6RC5:1.26.2.1
	TIGRIS_1_0_6RC4:1.26.2.1
	TIGRIS_1_0_6RC3:1.26.2.1
	TIGRIS_1_0_6RC2:1.26.2.1
	TIGRIS_1_0_6RC1:1.26.2.1
	TIGRIS_1_0_5:1.26.2.1
	TIGRIS_1_0_5RC6:1.26.2.1
	TIGRIS_1_0_5RC5:1.26.2.1
	TIGRIS_1_0_5RC4:1.26.2.1
	TIGRIS_1_0_5RC3:1.26.2.1
	TIGRIS_1_0_5RC2:1.26.2.1
	TIGRIS_1_0_5RC1:1.26.2.1
	TIGRIS_1_0_4:1.26.2.1
	TIGRIS_1_0_3:1.26.2.1
	TIGRIS_1_0_2:1.26.2.1
	TIGRIS_1_0_1:1.26.2.1
	TIGRIS_1_0:1.26.2.1.0.4
	TIGRIS_1_0_0:1.26.2.1
	TIGRIS_1_0_0_RC1:1.26.0.2
	dlr:1.1.1
	TIGRIS_0_9_2_4:1.17
	TIGRIS_0_9_2_3:1.17
	HELM_PEER_PORT_BRANCH:1.1.1.2
	TURBINE_PEER:1.18
	TIGRIS_0_9_2_1:1.18
	TIGRIS_0_9_2:1.17.0.2
	TIGRIS_0_9_0:1.14.0.2
	TIGRIS_0_8_4:1.8.0.2
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1;
locks; strict;
comment	@# @;


1.29
date	2001.05.23.02.04.14;	author dlr;	state dead;
branches;
next	1.28;

1.28
date	2001.05.11.19.38.56;	author leonardr;	state Exp;
branches;
next	1.27;

1.27
date	2001.04.05.00.28.52;	author leonardr;	state Exp;
branches;
next	1.26;

1.26
date	2001.03.27.08.26.06;	author jrobbins;	state Exp;
branches
	1.26.2.1;
next	1.25;

1.25
date	2001.03.24.10.34.01;	author jrobbins;	state Exp;
branches;
next	1.24;

1.24
date	2001.03.24.09.06.03;	author jrobbins;	state Exp;
branches;
next	1.23;

1.23
date	2001.02.27.23.20.06;	author leonardr;	state Exp;
branches;
next	1.22;

1.22
date	2001.02.27.22.15.13;	author leonardr;	state Exp;
branches;
next	1.21;

1.21
date	2001.02.21.19.37.43;	author leonardr;	state Exp;
branches;
next	1.20;

1.20
date	2001.02.21.01.08.29;	author dlr;	state Exp;
branches;
next	1.19;

1.19
date	2001.02.02.18.34.31;	author jrobbins;	state Exp;
branches;
next	1.18;

1.18
date	2001.01.23.20.38.28;	author leonardr;	state Exp;
branches
	1.18.2.1;
next	1.17;

1.17
date	2001.01.12.22.25.27;	author leonardr;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2001.01.08.18.26.19;	author leonardr;	state Exp;
branches;
next	1.15;

1.15
date	2000.12.21.05.12.13;	author jrobbins;	state Exp;
branches;
next	1.14;

1.14
date	2000.12.21.00.45.16;	author dlr;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2000.12.18.23.33.24;	author jrobbins;	state Exp;
branches;
next	1.12;

1.12
date	2000.12.15.04.37.58;	author leonardr;	state Exp;
branches;
next	1.11;

1.11
date	2000.12.12.21.46.40;	author leonardr;	state Exp;
branches;
next	1.10;

1.10
date	2000.12.12.17.24.23;	author cameron;	state Exp;
branches;
next	1.9;

1.9
date	2000.12.05.22.09.42;	author leonardr;	state Exp;
branches;
next	1.8;

1.8
date	2000.12.01.14.10.17;	author edk;	state Exp;
branches;
next	1.7;

1.7
date	2000.11.27.19.14.35;	author susank;	state Exp;
branches;
next	1.6;

1.6
date	2000.11.22.23.42.28;	author leonardr;	state Exp;
branches;
next	1.5;

1.5
date	2000.11.17.02.41.47;	author leonardr;	state Exp;
branches;
next	1.4;

1.4
date	2000.11.16.18.54.55;	author leonardr;	state Exp;
branches;
next	1.3;

1.3
date	2000.11.16.18.00.20;	author leonardr;	state Exp;
branches;
next	1.2;

1.2
date	2000.11.15.18.49.05;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2000.11.12.21.18.08;	author dlr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.11.12.21.18.08;	author dlr;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2001.02.21.00.36.54;	author dlr;	state Exp;
branches;
next	;

1.14.2.1
date	2000.12.21.05.43.46;	author jrobbins;	state Exp;
branches;
next	;

1.17.2.1
date	2001.02.16.02.19.35;	author jrobbins;	state Exp;
branches;
next	;

1.18.2.1
date	2001.01.31.02.05.50;	author leonardr;	state Exp;
branches;
next	1.18.2.2;

1.18.2.2
date	2001.02.08.01.54.32;	author elicia;	state Exp;
branches;
next	1.18.2.3;

1.18.2.3
date	2001.02.08.18.13.44;	author leonardr;	state Exp;
branches;
next	1.18.2.4;

1.18.2.4
date	2001.02.12.17.20.30;	author leonardr;	state Exp;
branches;
next	1.18.2.5;

1.18.2.5
date	2001.02.12.18.06.24;	author leonardr;	state Exp;
branches;
next	1.18.2.6;

1.18.2.6
date	2001.02.16.21.20.43;	author leonardr;	state Exp;
branches;
next	1.18.2.7;

1.18.2.7
date	2001.02.17.19.09.20;	author leonardr;	state Exp;
branches;
next	;

1.26.2.1
date	2001.04.05.00.45.30;	author jrobbins;	state Exp;
branches
	1.26.2.1.4.1;
next	;

1.26.2.1.4.1
date	2001.06.21.01.05.58;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.29
log
@Removed WM templates in favor of Velocity templates.
@
text
@#parse "$BRAND_TEMPLATE_ROOT/Admin_Nav.wm"

#set $showDeleteControls=false
#set $showApproveControls=false
#set $projects = $currentUser.getProjectsForUser()
#foreach $project in $projects
{
 #if $loginUser.hasRoleGrantPermission($project)
 {
  #set $showApproveControls=true
 }
 #if $loginUser.canRevokeRole($currentUser, $project) 
 {
  #set $showDeleteControls=true
 }
}

#if ($updateSuccessful) {
    <p class="Warning">Update succeeded</p>
}


<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" BORDER="0" WIDTH="100%">
<FORM ACTION="UserEdit?userID=$currentUser.getID()" METHOD="POST"
      ENCTYPE="application/x-www-form-urlencoded">
<INPUT TYPE="hidden" NAME="userID" VALUE="$currentUser.getID()">
  <TR>
    <TD CLASS="Header" NOWRAP>Edit User: <SPAN CLASS="ProjectNameHeader">$currentUser.getLoginName()</SPAN></TD>  
  </TR>
</TABLE>

<TABLE BORDER="0" WIDTH="100%">
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Login Name:</TD>
    <TD ALIGN="left" class="PlainText">$currentUser.getLoginName()</TD>
  </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Real Name:</TD>
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="realName" SIZE="25" VALUE="$realName"></TD>
  </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Email:</TD>
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="email" SIZE="25" VALUE="$email"></TD>
  </TR>
   <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Organization:</TD>
#if ($acl.hasPermission("User - Edit", $currentUser.getDomain()))
{
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="organization" SIZE="25" VALUE="$organization"></TD>
} #else {
    <TD ALIGN="left" class="PlainText">$organization</TD>
}
   </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Password:</TD>
    <TD ALIGN="left"><INPUT TYPE="password" NAME="passwd" SIZE="25" VALUE=""></TD>
  </TR>
  <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Retype password:</TD>
    <TD ALIGN="left"><INPUT TYPE="password" NAME="passwdConfirm" SIZE="25" VALUE=""></TD>
  </TR>

#set $userGroups = $currentUser.getRegularGroups()
<TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Group Memberships:</TD>
<TD ALIGN="left" class="PlainText">
#if (!$userGroups.isEmpty())
{
 #foreach $group in $userGroups
 {  
  #if ($acl.hasPermission("UserGroup - Edit", $currentUser.getDomain()))
  {
   <A HREF="UserGroupEdit?userGroupID=$group.getID()">$group.getRealName()</a><br>
  } #else { 
   $group.getName()<br>
  }
 }
} #else {
 None
}
</TD></TR>

#set $hasHostRole=false
#set $hasDomainRole=false
#set $userACL=$currentUser.getACL()

#foreach $role in $host.getHostRoles()
{
 #if ($userACL.hasRole($role))
 {
  #set $hasHostRole=true
 }
}

#foreach $role in $host.getDomainRoles()
{
 #if ($userACL.hasRole($role, $currentUser.getDomain()))
 {
  #set $hasDomainRole=true
 }
}

#if ($hasHostRole || $acl.hasPermission("Host Role - Grant"))
{
 <TR>
  <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Site-wide Roles:</TD>
 #foreach $role in $host.getHostRoles()
 {
  <TD ALIGN="left" class="PlainText">
  #if ($acl.hasPermission("Host Role - Grant") && !($currentUser.isSuperUser() && $role.denotesOwner()))
  {
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
   #if ($userACL.hasRole($role))
   {
    CHECKED
   }
   >$role.getName()<br>
  } #else { 
    #if ($userACL.hasRole($role))
    {
     $role.getName() <INPUT TYPE="hidden" NAME="Ignore $role.getID()"><br>
    }
  }
 }
 </TD></TR>
}

#if ($hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()))
{
 <TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Domain-wide Roles:</TD>
 <TD ALIGN="left" class="PlainText" VALIGN="top">
 #foreach $role in $host.getDomainRoles()
 {
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()))
  {
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
   #if ($userACL.hasRole($role, $currentUser.getDomain()))
   {
    CHECKED
   }
   >$role.getName()<br>
  } #else {
    #if ($userACL.hasRole($role, $currentUser.getDomain()))
    {
     $role.getName() <INPUT TYPE="hidden" NAME="Ignore $role.getID()"><br>
    }
  }
 }
 </TD></TR>
}

  <TR>
    <TD></TD>
    <TD><INPUT TYPE="submit" NAME="Button" VALUE="Submit Changes"></TD>
  </TR>
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD VALIGN="top" CLASS="InputHeader" NOWRAP>Project Roles:</TD>
    <TD>
      <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">  
        <TR>
          <TD HEIGHT="1" BGCOLOR="#efefef" COLSPAN="5"><SPACER TYPE="block" HEIGHT="1"></TD>
        </TR>
        <TR>
          <TD CLASS="ProjectDownloadHeader" BGCOLOR="#efefef">Project</TD>
          <TD WIDTH="10" BGCOLOR="#efefef"><SPACER TYPE="block" WIDTH="10"></TD>
          <TD CLASS="ProjectDownloadHeader" BGCOLOR="#efefef" NOWRAP>Roles <SPAN CLASS="ProjectName"></SPAN></TD>
          <TD WIDTH="10" BGCOLOR="#efefef"><SPACER TYPE="block" WIDTH="10"></TD>

#if ($showApproveControls || $showDeleteControls)
{
          <TD CLASS="ProjectDownloadHeader" BGCOLOR="#efefef">Operations</TD>
}
        </TR>
        <TR>
          <TD HEIGHT="1" BGCOLOR="#efefef" COLSPAN="7"><SPACER TYPE="block" HEIGHT="1"></TD>
        </TR>
#foreach $project in $projects
{
  ## Flag for whether or not to print out the project name.
  #set $printProjectName = "true"

  #if ($haveProjects)
  {
        <TR> 
          <TD HEIGHT="2" COLSPAN="5"><SPACER TYPE="block" HEIGHT="2"></TD> 
        </TR> 
        <TR> 
          <TD HEIGHT="1" BGCOLOR="#efefef" COLSPAN="5"><SPACER TYPE="block" HEIGHT="1"></TD>
        </TR> 
        <TR> 
          <TD HEIGHT="2" COLSPAN="5"><SPACER TYPE="block" HEIGHT="2"></TD> 
        </TR> 
  }

  ## Loop established roles.
  #foreach $role in $currentUser.getRolesInProject($project) 
  { 
        <TR>
          <TD CLASS="ProjectName">
    #if ($printProjectName.equals("true"))
    {
            <A HREF="$res.encodeUrl($project.getProjectHome())">$project.getName()</A>
      #set $printProjectName = ""
    } #else {
            &nbsp;
    }
          </TD>
          <TD>&nbsp;</TD> 
          <TD CLASS="PlainText" NOWRAP>$role.getName()</TD>
          <TD>&nbsp;</TD>
          #if ($loginUser.canRevokeRole($currentUser, $project))
          {
           <TD CLASS="PlainText" NOWRAP>
             <INPUT TYPE="checkbox" NAME="$project.getID()\.$role.getID()"
                    VALUE="delete">Delete
           </TD>
          }
        </TR>
  }

  ## Loop pending roles.
  #foreach $role in $currentUser.getRequestedRolesInProject($project)
  {
        <TR>
          <TD CLASS="ProjectName">
    #if ($printProjectName.equals("true"))
    {
            <A HREF="$res.encodeUrl($project.getProjectHome())">$project.getName()</A>
      #set $printProjectName = ""
    } #else {
            &nbsp;
    }
          </TD>
          <TD>&nbsp;</TD> 
          <TD CLASS="PlainText" NOWRAP>$role.getName() <i>(Pending)</i></TD>
          <TD>&nbsp;</TD>
          #if ($loginUser.hasRoleGrantPermission($project))
          {
           <TD CLASS="PlainText" NOWRAP>
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()" 
                    VALUE="approve">Approve &nbsp;
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                    VALUE="defer" CHECKED>Defer &nbsp;
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                    VALUE="delete">Disapprove &nbsp;
           </TD>
          } #else {
           #if ($loginUser.canRevokeRole($currentUser, $project))
           {
            <TD CLASS="PlainText" NOWRAP>
              <INPUT TYPE="checkbox" NAME="$project.getID();.$role.getID()"
                     VALUE="delete">Delete
            </TD>
           }
          }
        </TR>
  }
  #set $haveProjects = true
}
#if ($haveProjects)
{
 #if ($showApproveControls || $showDeleteControls)
 {
        <TR>
          <TD COLSPAN="5">
            <INPUT TYPE="submit" NAME="Button" VALUE="Edit Roles">
          </TD>
        </TR>
 }
} #else {
        <TR>
          <TD COLSPAN="5" class="PlainText">
 #if ($currentUser.getID().equals($loginUser.getID()))
{
	    <I>You are not currently involved in any projects. You
               can join a project from its home page.</i>              
} #else {
            <I>No projects associated with $currentUser.getLoginName().</I>
}          </TD>
        </TR>
}
      </TABLE>
    </TD>
  </TR>
#if ($acl.hasPermission("User - View - Self", $currentUser.getDomain()))
{
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD CLASS="InputHeader" VALIGN="TOP" NOWRAP>Detailed Role Info:</TD>
    <TD CLASS="PlainText">
      <a href="/servlets/ACLDump?userID=$currentUser.getID()">Direct and Derived Roles</a><br>
      <a href="/servlets/PermissionDump?userID=$currentUser.getID()">Details of Permissions</a><br>
    </TD>
  </TR>
}
#if (!($loginUser.equals($currentUser)) && $acl.hasPermission("User - Delete", $currentUser.getDomain()))
{
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD CLASS="InputHeader" NOWRAP>Other Operations:</TD>
    <TD CLASS="StatText">
      <A HREF="UserDelete?userID=$currentUser.getID()">Delete User</a>
    </TD>
</FORM>
  </TR>
}
</TABLE>

@


1.28
log
@A Heartbreaking Patch of Staggering Genius: adds capacity (but no interface) for deeply nested projects, categories, and project groups. As a side effect, gets rid of the hacky special 'all public projects in domain' group. There are probably bugs in this, and some of those bugs are probably security holes, so watch out.
@
text
@@


1.27
log
@Fixed pathological case where checkboxes were shown for a user who couldn't use them.
@
text
@a84 1
#set $hasPublicDomainRole=false
a100 4
 #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
 {
  #set $hasPublicDomainRole=true
 }
a152 24
#if ($hasPublicDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
{
 <TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Roles in the domain's public projects:</TD>
 <TD ALIGN="left" class="PlainText" VALIGN="top">
 #foreach $role in $host.getDomainRoles()
 {
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
  {
   <INPUT TYPE="checkbox" NAME="Grant Public $role.getID()"
   #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
   {
    CHECKED
   }
   >$role.getName()<br>
  } #else {
    #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
    {
     $role.getName() <INPUT TYPE="hidden" NAME="Ignore $role.getID()"><br>
    }
  }
 }
 </TD></TR>
}
@


1.26
log
@removed extra </form> tag
moved form tags inside of <table> to avoid extra spacing
made "update succeeded" message stand out more
@
text
@d133 1
a133 1
#if ($hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
d140 1
a140 1
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
@


1.26.2.1
log
@applying buddied change from leonardr from HEAD to branch
@
text
@d133 1
a133 1
#if ($hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()))
d140 1
a140 1
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain().getSpecialProject()))
@


1.26.2.1.4.1
log
@Backported from the HEAD:

This text was the cause of some confusion for certain users (we will
not divulge their names to protect their identities, lest they be
ridiculed for their stupidity  ;).

IZ #4608
@
text
@d299 1
a299 1
            <INPUT TYPE="submit" NAME="Button" VALUE="Update Roles">
@


1.25
log
@added style
@
text
@d19 1
a19 1
    <li><span class="PlainText">Update succeeded</span>
d22 2
a26 2

<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" BORDER="0" WIDTH="100%">
a314 1
</FORM>
@


1.24
log
@added much needed admin nav element
@
text
@d51 1
a51 1
    <TD ALIGN="left">$organization</TD>
@


1.23
log
@Added code to treat unprivileged users' UserEdit submissions as lack-of-interest-in-checkboxes, not unchecked-checkboxes.
@
text
@d1 2
@


1.22
log
@Made UserEdit host/domain role grant/revoke work.
@
text
@d124 1
a124 1
     $role.getName()<br>
d149 1
a149 1
          $role.getName()<br>
d174 1
a174 1
          $role.getName()<br>
@


1.21
log
@Changed reference to nonexistant variable to calculation of the value it should contain.
@
text
@d116 1
a116 1
   #if ($userACL.hasRole($role, $currentUser.getDomain()))
d122 1
a122 1
    #if ($userACL.hasRole($role, $currentUser.getDomain()))
d165 1
a165 1
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
@


1.20
log
@This is the highest revision from the HELM_PEER_PORT_BRANCH.  The previous import caused too many conflicts to resolve manually
@
text
@d330 1
a330 1
#if (!$isEditingSelf && $acl.hasPermission("User - Delete", $currentUser.getDomain()))
@


1.19
log
@applied style
@
text
@d20 1
a20 1
<FORM ACTION="$res.encodeUrl("UserEdit?userID=$currentUser.getID()")" METHOD="POST"
d22 1
a22 1
<INPUT TYPE="hidden" NAME="userID" VALUE="$currentUser.getUserID()">
d26 1
a26 1
    <TD CLASS="Header" NOWRAP>Edit User: <SPAN CLASS="ProjectNameHeader">$currentDomain.getName()</SPAN></TD>  
d33 1
a33 1
    <TD ALIGN="left" class="PlainText">$currentUser.getLoginID()</TD>
a42 2
#if ($acl.hasPermissionForDomain("User - Edit", $currentDomain.getID()))
{
d45 2
d48 3
a51 1
}
d69 1
a69 1
  #if ($acl.hasPermissionForDomain("UserGroup - Edit", $currentDomain.getID()))
d71 1
a71 1
   <A HREF="UserGroupEdit?userGroupID=$group.getID()">$group.getName()</a><br>
d88 1
a88 1
 #if ($userACL.hasRole($role.getID()))
d96 1
a96 1
 #if ($userACL.hasRole($role.getID()))
d100 1
a100 1
 #if ($userACL.hasRoleInPublicDomainProjects($role.getID()))
d106 1
a106 1
#if ($hasHostRole || $acl.hasPermissionForHost("Host Role - Grant"))
d113 1
a113 1
  #if ($acl.hasPermissionForHost("Host Role - Grant"))
d116 1
a116 1
   #if ($userACL.hasRole($role.getID()))
d122 1
a122 1
    #if ($userACL.hasRole($role.getID()))
d131 1
a131 1
#if ($hasDomainRole || $acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain.getID()))
d138 1
a138 1
  #if ($acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain.getID()))
d141 1
a141 1
   #if ($userACL.hasRoleInDomain($role.getID(), $currentDomain.getID()))
d147 1
a147 1
    #if ($userACL.hasRoleInDomain($role.getID(), $currentDomain.getID()))
d156 1
a156 1
#if ($hasPublicDomainRole || $acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain.getID()))
d163 1
a163 1
  #if ($acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain.getID()))
d166 1
a166 1
   #if ($userACL.hasRoleInPublicDomainProjects($role.getID(), $currentDomain.getID()))
d172 1
a172 1
    #if ($userACL.hasRoleInPublicDomainProjects($role.getID(), $currentDomain.getID()))
d227 1
a227 1
  #foreach $role in $currentUser.getRolesInProject($project.getID()) 
d253 1
a253 1
  #foreach $role in $currentUser.getRequestedRolesInProject($project.getID())
d309 1
a309 1
            <I>No projects associated with $currentUser.getLoginID().</I>
d317 1
a317 1
#if ($acl.hasPermissionForDomain("User - View - Self", $currentDomain.getID()))
d330 1
a330 1
#if (!$isEditingSelf && $acl.hasPermissionForDomain("User - Delete", $currentDomain.getID()))
d338 1
a338 1
      <A HREF="UserDelete?userID=$currentUser.getUserID()">Delete User</a>
@


1.18
log
@UserEdit now shows roles in the public special group for a domain as well as the regular special group.
@
text
@d335 1
a335 1
    <TD>
@


1.18.2.1
log
@Converted permission checking somewhat.
@
text
@d43 1
a43 1
#if ($acl.hasPermissionForDomain("User - Edit", $currentDomain))
d67 1
a67 1
  #if ($acl.hasPermissionForDomain("UserGroup - Edit", $currentDomain))
d129 1
a129 1
#if ($hasDomainRole || $acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain))
d136 1
a136 1
  #if ($acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain))
d154 1
a154 1
#if ($hasPublicDomainRole || $acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain))
d161 1
a161 1
  #if ($acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain))
d315 1
a315 1
#if ($acl.hasPermissionForDomain("User - View - Self", $currentDomain))
d328 1
a328 1
#if (!$isEditingSelf && $acl.hasPermissionForDomain("User - Delete", $currentDomain))
@


1.18.2.2
log
@Ported UserEdit--still some bugs that need to be worked out.
@
text
@d22 1
a22 1
<INPUT TYPE="hidden" NAME="userID" VALUE="$currentUser.getID()">
d33 1
a33 1
    <TD ALIGN="left" class="PlainText">$currentUser.getLoginName()</TD>
d43 2
a46 2
#if ($acl.hasPermissionForDomain("User - Edit", $currentDomain))
{
d48 1
a48 2
} #else {
    <TD ALIGN="left">$organization</TD>
a49 1
   </TR>
d69 1
a69 1
   <A HREF="UserGroupEdit?userGroupID=$group.getID()">$group.getRealName()</a><br>
d86 1
a86 1
 #if ($userACL.hasRole($role))
d94 1
a94 1
 #if ($userACL.hasRole($role))
d98 1
a98 1
 #if ($userACL.hasRoleInPublicDomainProjects($role, $user.getDomain()))
d114 1
a114 1
   #if ($userACL.hasRole($role))
d120 1
a120 1
    #if ($userACL.hasRole($role))
d139 1
a139 1
   #if ($userACL.hasRoleInDomain($role, $currentDomain))
d145 1
a145 1
    #if ($userACL.hasRoleInDomain($role, $currentDomain))
d164 1
a164 1
   #if ($userACL.hasRoleInPublicDomainProjects($role, $currentDomain))
d170 1
a170 1
    #if ($userACL.hasRoleInPublicDomainProjects($role, $currentDomain))
d225 1
a225 1
  #foreach $role in $currentUser.getRolesInProject($project) 
d251 1
a251 1
  #foreach $role in $currentUser.getRequestedRolesInProject($project)
d336 1
a336 1
      <A HREF="UserDelete?userID=$currentUser.getID()">Delete User</a>
@


1.18.2.3
log
@Porting changes to UserEdit
@
text
@d20 1
a20 1
<FORM ACTION="UserEdit?userID=$currentUser.getID()" METHOD="POST"
d26 1
a26 1
    <TD CLASS="Header" NOWRAP>Edit User: <SPAN CLASS="ProjectNameHeader">$currentUser.getLoginName()</SPAN></TD>  
d45 1
a45 1
#if ($acl.hasPermissionForDomain("User - Edit", $currentUser.getDomain()))
d69 1
a69 1
  #if ($acl.hasPermissionForDomain("UserGroup - Edit", $currentUser.getDomain()))
d96 1
a96 1
 #if ($userACL.hasRole($role, $currentUser.getDomain()))
d100 1
a100 1
 #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
d116 1
a116 1
   #if ($userACL.hasRole($role, $currentUser.getDomain()))
d122 1
a122 1
    #if ($userACL.hasRole($role, $currentUser.getDomain()))
d131 1
a131 1
#if ($hasDomainRole || $acl.hasPermissionForDomain("Domain Role - Grant", $currentUser.getDomain()))
d138 1
a138 1
  #if ($acl.hasPermissionForDomain("Domain Role - Grant", $currentUser.getDomain()))
d141 1
a141 1
   #if ($userACL.hasRole($role, $currentUser.getDomain()))
d147 1
a147 1
    #if ($userACL.hasRole($role, $currentUser.getDomain()))
d156 1
a156 1
#if ($hasPublicDomainRole || $acl.hasPermissionForDomain("Domain Role - Grant", $currentUser.getDomain()))
d163 1
a163 1
  #if ($acl.hasPermissionForDomain("Domain Role - Grant", $currentUser.getDomain()))
d166 1
a166 1
   #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
d172 1
a172 1
    #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
d317 1
a317 1
#if ($acl.hasPermissionForDomain("User - View - Self", $currentUser.getDomain()))
d330 1
a330 1
#if (!$isEditingSelf && $acl.hasPermissionForDomain("User - Delete", $currentUser.getDomain()))
@


1.18.2.4
log
@Got rid of calls to deprecated permission checking methods.
@
text
@d45 1
a45 1
#if ($acl.hasPermission("User - Edit", $currentUser.getDomain()))
d69 1
a69 1
  #if ($acl.hasPermission("UserGroup - Edit", $currentUser.getDomain()))
d106 1
a106 1
#if ($hasHostRole || $acl.hasPermission("Host Role - Grant"))
d113 1
a113 1
  #if ($acl.hasPermission("Host Role - Grant"))
d131 1
a131 1
#if ($hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
d138 1
a138 1
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
d156 1
a156 1
#if ($hasPublicDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
d163 1
a163 1
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
d317 1
a317 1
#if ($acl.hasPermission("User - View - Self", $currentUser.getDomain()))
d330 1
a330 1
#if (!$isEditingSelf && $acl.hasPermission("User - Delete", $currentUser.getDomain()))
@


1.18.2.5
log
@Changed calls to getLoginID to calls to getLoginName
@
text
@d309 1
a309 1
            <I>No projects associated with $currentUser.getLoginName().</I>
@


1.18.2.6
log
@Don't show checkbox for revoking host ownership roles from superuser (cause you can't do that)
@
text
@d113 1
a113 1
  #if ($acl.hasPermission("Host Role - Grant") && !($currentUser.isSuperUser() && $role.denotesOwner()))
@


1.18.2.7
log
@Ported changes from head.
@
text
@d337 1
a337 1
    <TD CLASS="StatText">
@


1.17
log
@Show user group memberships on user edit page.
@
text
@d81 1
d98 4
d154 24
@


1.17.2.1
log
@minor html tweaks
@
text
@d306 1
a306 1
    <TD class="PlainText">
@


1.16
log
@Some UI consistency changes.
@
text
@d59 20
@


1.15
log
@added style
@
text
@a285 1
<FORM METHOD="post" ACTION="$res.encodeUrl("UserDelete?userID=$currentUser.getUserID()")">
d287 1
a287 1
      <INPUT TYPE="submit" NAME="Button" VALUE="Delete User">
@


1.14
log
@Do not display "Delete User" button if editing self.
@
text
@d17 1
a17 1
    <li>Update succeeded
@


1.14.2.1
log
@moved minor fixes from HEAD
@
text
@d17 1
a17 1
    <li><span class="PlainText">Update succeeded</span>
@


1.13
log
@added links to new servlets to debug permissions
@
text
@a0 10
## WebMacro variables:
##
## $currentUser : User
## $email : String
## $realName : String
## $passwd : String
## $passwdConfirm : String
## $currentProject : Project
## $updateSuccessful : a flag indicating if an update operation was successful

d279 1
a279 1
#if ($acl.hasPermissionForDomain("User - Delete", $currentDomain.getID()))
@


1.12
log
@Big patch whose main effect is to make dynamic the list of roles on UserEdit.
@
text
@d262 1
a262 1
          <TD COLSPAN="5">
d276 13
@


1.11
log
@Support for user organization
@
text
@d30 1
a30 1
<FORM ACTION="$res.encodeUrl("UserEdit")" METHOD="POST"
d68 22
a89 1
#if ($acl.hasPermissionForHost("Host Role - Grant") || $acl.hasPermissionForDomain("Domain Role - Grant", $currentDomain.getID()))
d91 5
a95 3
  <TR>
    <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Site-wide Roles:</TD>
    <TD ALIGN="left" class="PlainText">
d98 8
a105 8
      <INPUT TYPE="checkbox" NAME="grantHostAdmin" VALUE="true"
    #if ($userIsHostAdmin)
    {
             CHECKED
    }
      >Host Admin<br>
  } #else {
    #if ($userIsHostAdmin)
d107 1
a107 1
          Host Admin
d110 3
d114 7
a120 1
 
d123 8
a130 2
      <INPUT TYPE="checkbox" NAME="grantDomainAdmin" VALUE="true"
    #if ($userIsDomainAdmin)
d132 1
a132 1
             CHECKED
a133 7
      >Domain Admin
  } #else {
   #if ($userIsDomainAdmin)
   {
         Domain Admin
   }
  
d135 2
a136 2
    </TD>
  </TR>
d138 1
@


1.10
log
@
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d53 7
@


1.9
log
@Added support for resigning your own roles.
@
text
@d65 1
a65 1
    <TD ALIGN="left">
d105 1
a105 1
    <TD COLSPAN="2"><HR SIZE="1" NOSAHDE></TD>
@


1.8
log
@present an appropriate message (dunno if this is it, but if not
it's easy to fix) if the update is successful.
@
text
@d11 15
d119 2
a120 7
#set $grantRole=$acl.hasPermissionForDomain("Project Role - Grant", $currentDomain.getID())
#set $grantRoleU=$acl.hasPermissionForDomain("Unapproved Project Role - Grant", $currentDomain.getID())
#if ($grantRole || $grantRoleU)
{
 #set $showRoleControls="true"
}
#if ($showRoleControls)
d128 1
a128 1
#foreach $project in $currentUser.getProjectsForUser()
d162 1
a162 1
          #if ($showRoleControls)
d188 1
a188 1
          #if ($showRoleControls && $loginUser.hasRoleGrantPermission($project))
d198 8
d209 1
a209 1
  #set $haveProjects = "true"
d213 1
a213 1
 #if ($showRoleControls)
@


1.7
log
@added domain name to page header
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d9 5
@


1.6
log
@Changing button name in the servlet and template before someone else changes it only in the template and breaks it (which has happened before).
@
text
@d16 1
a16 1
    <TD CLASS="Header" NOWRAP>$displayName</TD>  
@


1.5
log
@Show site-wide role selection based on logged-in user's permission, not edited user's permission.
@
text
@d82 1
a82 1
    <TD><INPUT TYPE="submit" NAME="Button" VALUE="Edit User"></TD>
@


1.4
log
@Accessing a servlet that requires a user without specifying a user will now be equivalent to specifying yourself as the user.
@
text
@d41 1
a41 1
#if ($userIsHostAdmin || $userIsDomainAdmin)
@


1.3
log
@Show different UserEdit message when user has no roles in projects.
@
text
@d206 1
a206 1
            <I>No projects associated with $currentUser.getLoginID();.</I>
@


1.2
log
@Fixed security bug. Also display buttons for role manipulation in UserEdit only if you can use those roles.
@
text
@d201 5
d207 1
a207 1
          </TD>
@


1.1
log
@Initial revision
@
text
@d41 1
a41 1
#if ($showHostAdmin || $showDomainAdmin)
d46 1
a46 1
  #if ($showHostAdmin)
d54 5
d60 3
a62 1
  #if ($showDomainAdmin)
d70 6
d99 8
d108 1
d147 7
a153 4
          <TD CLASS="PlainText" NOWRAP>
            <INPUT TYPE="checkbox" NAME="$project.getID()\.$role.getID()"
                   VALUE="delete">Delete
          </TD>
d173 11
a183 8
          <TD CLASS="PlainText" NOWRAP>
            <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()" 
                   VALUE="approve">Approve &nbsp;
            <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                   VALUE="defer" CHECKED>Defer &nbsp;
            <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                   VALUE="delete">Disapprove &nbsp;
          </TD>
d190 2
d197 1
d224 1
@


1.1.1.1
log
@Merging newhelm tree into helm, as per IZ issue #557.  Previous major version of helm is tagged TIGRIS_NOV_11_2000.
@
text
@@


1.1.1.2
log
@Replacing the HEAD with the HELM_PEER_PORT_BRANCH.
@
text
@d1 8
a8 18
#set $showDeleteControls=false
#set $showApproveControls=false
#set $projects = $currentUser.getProjectsForUser()
#foreach $project in $projects
{
 #if $loginUser.hasRoleGrantPermission($project)
 {
  #set $showApproveControls=true
 }
 #if $loginUser.canRevokeRole($currentUser, $project) 
 {
  #set $showDeleteControls=true
 }
}

#if ($updateSuccessful) {
    <li><span class="PlainText">Update succeeded</span>
}
d10 1
a10 1
<FORM ACTION="UserEdit?userID=$currentUser.getID()" METHOD="POST"
d12 1
a12 1
<INPUT TYPE="hidden" NAME="userID" VALUE="$currentUser.getID()">
d16 1
a16 1
    <TD CLASS="Header" NOWRAP>Edit User: <SPAN CLASS="ProjectNameHeader">$currentUser.getLoginName()</SPAN></TD>  
d23 1
a23 1
    <TD ALIGN="left" class="PlainText">$currentUser.getLoginName()</TD>
a32 9
   <TR>
    <TD WIDTH="20%" CLASS="InputHeader" NOWRAP>Organization:</TD>
#if ($acl.hasPermission("User - Edit", $currentUser.getDomain()))
{
    <TD ALIGN="left"><INPUT TYPE="TEXT" NAME="organization" SIZE="25" VALUE="$organization"></TD>
} #else {
    <TD ALIGN="left">$organization</TD>
}
   </TR>
d41 1
a41 6

#set $userGroups = $currentUser.getRegularGroups()
<TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Group Memberships:</TD>
<TD ALIGN="left" class="PlainText">
#if (!$userGroups.isEmpty())
d43 4
a46 3
 #foreach $group in $userGroups
 {  
  #if ($acl.hasPermission("UserGroup - Edit", $currentUser.getDomain()))
d48 2
a49 52
   <A HREF="UserGroupEdit?userGroupID=$group.getID()">$group.getRealName()</a><br>
  } #else { 
   $group.getName()<br>
  }
 }
} #else {
 None
}
</TD></TR>

#set $hasHostRole=false
#set $hasDomainRole=false
#set $hasPublicDomainRole=false
#set $userACL=$currentUser.getACL()

#foreach $role in $host.getHostRoles()
{
 #if ($userACL.hasRole($role))
 {
  #set $hasHostRole=true
 }
}

#foreach $role in $host.getDomainRoles()
{
 #if ($userACL.hasRole($role, $currentUser.getDomain()))
 {
  #set $hasDomainRole=true
 }
 #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
 {
  #set $hasPublicDomainRole=true
 }
}

#if ($hasHostRole || $acl.hasPermission("Host Role - Grant"))
{
 <TR>
  <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Site-wide Roles:</TD>
 #foreach $role in $host.getHostRoles()
 {
  <TD ALIGN="left" class="PlainText">
  #if ($acl.hasPermission("Host Role - Grant") && !($currentUser.isSuperUser() && $role.denotesOwner()))
  {
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
   #if ($userACL.hasRole($role, $currentUser.getDomain()))
   {
    CHECKED
   }
   >$role.getName()<br>
  } #else { 
    #if ($userACL.hasRole($role, $currentUser.getDomain()))
d51 1
a51 1
     $role.getName()<br>
d53 1
d55 1
a55 12
 }
 </TD></TR>
}

#if ($hasDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
{
 <TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Domain-wide Roles:</TD>
 <TD ALIGN="left" class="PlainText" VALIGN="top">
 #foreach $role in $host.getDomainRoles()
 {
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
d57 2
a58 8
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
   #if ($userACL.hasRole($role, $currentUser.getDomain()))
   {
    CHECKED
   }
   >$role.getName()<br>
  } #else {
    #if ($userACL.hasRole($role, $currentUser.getDomain()))
d60 1
a60 1
          $role.getName()<br>
d62 1
d64 2
a65 27
 }
 </TD></TR>
}

#if ($hasPublicDomainRole || $acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
{
 <TR>
 <TD WIDTH="20%" VALIGN="top" CLASS="InputHeader" NOWRAP>Roles in the domain's public projects:</TD>
 <TD ALIGN="left" class="PlainText" VALIGN="top">
 #foreach $role in $host.getDomainRoles()
 {
  #if ($acl.hasPermission("Domain Role - Grant", $currentUser.getDomain()))
  {
   <INPUT TYPE="checkbox" NAME="Grant $role.getID()"
   #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
   {
    CHECKED
   }
   >$role.getName()<br>
  } #else {
    #if ($userACL.hasRoleInPublicDomainProjects($role, $currentUser.getDomain()))
    {
          $role.getName()<br>
    }
  }
 }
 </TD></TR>
d69 1
a69 1
    <TD><INPUT TYPE="submit" NAME="Button" VALUE="Submit Changes"></TD>
d72 1
a72 1
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
a85 3

#if ($showApproveControls || $showDeleteControls)
{
a86 1
}
d91 1
a91 1
#foreach $project in $projects
d110 1
a110 1
  #foreach $role in $currentUser.getRolesInProject($project) 
d125 4
a128 7
          #if ($loginUser.canRevokeRole($currentUser, $project))
          {
           <TD CLASS="PlainText" NOWRAP>
             <INPUT TYPE="checkbox" NAME="$project.getID()\.$role.getID()"
                    VALUE="delete">Delete
           </TD>
          }
d133 1
a133 1
  #foreach $role in $currentUser.getRequestedRolesInProject($project)
d148 8
a155 19
          #if ($loginUser.hasRoleGrantPermission($project))
          {
           <TD CLASS="PlainText" NOWRAP>
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()" 
                    VALUE="approve">Approve &nbsp;
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                    VALUE="defer" CHECKED>Defer &nbsp;
             <INPUT TYPE="radio" NAME="$project.getID()\.$role.getID()"
                    VALUE="delete">Disapprove &nbsp;
           </TD>
          } #else {
           #if ($loginUser.canRevokeRole($currentUser, $project))
           {
            <TD CLASS="PlainText" NOWRAP>
              <INPUT TYPE="checkbox" NAME="$project.getID();.$role.getID()"
                     VALUE="delete">Delete
            </TD>
           }
          }
d158 1
a158 1
  #set $haveProjects = true
a161 2
 #if ($showApproveControls || $showDeleteControls)
 {
a166 1
 }
d169 3
a171 8
          <TD COLSPAN="5" class="PlainText">
 #if ($currentUser.getID().equals($loginUser.getID()))
{
	    <I>You are not currently involved in any projects. You
               can join a project from its home page.</i>              
} #else {
            <I>No projects associated with $currentUser.getLoginName().</I>
}          </TD>
d178 1
a178 14
#if ($acl.hasPermission("User - View - Self", $currentUser.getDomain()))
{
  <TR>
    <TD COLSPAN="2"><HR SIZE="1" NOSHADE></TD>
  </TR>
  <TR>
    <TD CLASS="InputHeader" VALIGN="TOP" NOWRAP>Detailed Role Info:</TD>
    <TD CLASS="PlainText">
      <a href="/servlets/ACLDump?userID=$currentUser.getID()">Direct and Derived Roles</a><br>
      <a href="/servlets/PermissionDump?userID=$currentUser.getID()">Details of Permissions</a><br>
    </TD>
  </TR>
}
#if (!$isEditingSelf && $acl.hasPermission("User - Delete", $currentUser.getDomain()))
d185 3
a187 2
    <TD CLASS="StatText">
      <A HREF="UserDelete?userID=$currentUser.getID()">Delete User</a>
a192 1

@

