Skip to content

Commit

Permalink
Signup module updates (#325)
Browse files Browse the repository at this point in the history
1. Links in the the labkeyuserid column were broken. Added UserIdQueryForeignKey to the column.
2. Changed "containerId" parameter name to "folderId" since containerId is not allowed: HasAllowBindParameter.disallowed
3. ConfirmAction is now a FormViewAction. User is presented with a form where they provide a valid password. A new labkey user is created and assigned the password.
   - Code has been copied from LoginController.attemptSetPassword(). Consider moving to SecurityManager or AuthenticationManager?
   - Consider exposing the current PasswordRule through a Service.
4. Check for valid email with EmailValidator first since ValidEmail(email) will not throw an exception if the domain is missing from the email. The default domain configured for the server is appended. This is not a problem on skyline.ms since email validation is done in the JavaScript.
  • Loading branch information
vagisha authored Mar 16, 2023
1 parent ad58ba1 commit dcd59d8
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 88 deletions.
16 changes: 14 additions & 2 deletions signup/resources/schemas/signup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,26 @@
<column columnName="organization"/>
<column columnName="key"/>
<column columnName="container"/>
<column columnName="labkeyuserid"/>
<column columnName="labkeyuserid">
<fk>
<fkColumnName>UserId</fkColumnName>
<fkDbSchema>core</fkDbSchema>
<fkTable>UsersData</fkTable>
</fk>
</column>
</columns>
</table>
<table tableDbType="TABLE" tableName="movedusers" >
<columns>
<column columnName="_ts"/>
<column columnName="id"/>
<column columnName="labkeyuserid"/>
<column columnName="labkeyuserid">
<fk>
<fkColumnName>UserId</fkColumnName>
<fkDbSchema>core</fkDbSchema>
<fkTable>UsersData</fkTable>
</fk>
</column>
<column columnName="oldgroup"/>
<column columnName="newgroup"/>
</columns>
Expand Down
4 changes: 2 additions & 2 deletions signup/src/org/labkey/signup/SignUpAdmin.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<!--Creates drop down list of all containers-->
<h4 style="padding:0px; margin: 0px;">Add new user group rule</h4>
<form <%=formAction(AddPropertyAction.class, Method.Post)%>><labkey:csrf/>
<select id="containerId" name="containerId" onchange="loadGroups(this.value)">
<select id="folderId" name="folderId" onchange="loadGroups(this.value)">
<option disabled selected> -- select an option -- </option>
<%for(Container c: list) {
m.put(String.valueOf(c.getRowId()), SecurityManager.getGroups(c.getProject(), false));%> <!--Adds container and associated groups to map-->
Expand All @@ -82,7 +82,7 @@
<tr>
<td><%=h(c.getPath())%></td>
<td><%=h(property.get(SignUpModule.SIGNUP_GROUP_NAME))%></td>
<td><%=link("Remove", urlFor(RemovePropertyAction.class).addParameter("containerId", c.getRowId())).usePost()%></td>
<td><%=link("Remove", urlFor(RemovePropertyAction.class).addParameter("folderId", c.getRowId())).usePost()%></td>
</tr>
<%}
}%>
Expand Down
Loading

0 comments on commit dcd59d8

Please sign in to comment.