wiki:S2S_WEB_USER_RELATED_R0
Last modified 13 years ago Last modified on 03/04/09 16:50:45

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=S2S_WEB_USER_RELATED_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

This task is connected to the user part of the web server. It includes user registration, creation of user profile and the change to edit it.

Task requirements

  • depends on S2S_WEB_COMMONS_R1
  • there should be created a working registration link and page
  • the home page should be changed from login user to welcome user page
  • the user profile page should be created and added in the navigation menu
  • the user must have the chance to edit his/her profile
  • there is no need to be beautiful, the important part is to communicate correctly with the database and show the results as JSPs.

Task result

Pages and links about:

  • user registration
  • user profile(or username's profile)
  • editing profile

Implementation idea

  • Use the service package and its user and group classes for managing the users.
  • Create servlets in webapp package to handle the information from the new jsps.

S2S_WEB_COMMONS_R0
S2S_WEB_COMMONS_R1
S2S_DEPLOY_TECHNOLOGIES_R0
S2S_PERSISTENCE_COMMONS_R0
S2S_CORE_SECURITY_R0

How to demo

  • register a user
  • show the new user pages

Design

The user related content at that stage will consist of four jsp pages. register.jsp, index.jsp (home page), edit_profile.jsp and one additional page that will not function for now lost_password.jsp. There will be also some servlets working like redirectorers and action executors between the jsps. These servlets for now will be RegisterServlet and ProfileEditorServlet.

  • The home page of logged in user will be index.jsp. It will redirect the not logged in users to login.jsp (see S2S_WEB_COMMONS_R1). For now the

logged in users will be able to see information for their profile, their photo, fullname, about me info and website link, affiliation and the astea logo.

  • The registration logic will use register.jsp and the RegisterServlet.
    • The register.jsp page will have form containing all of the user fields + some additional The fields are :
      • Field for the username of the new user.
      • Two fields for the password one to type it and one to type it again to be sure.
      • Two fields for the email address one to type it and one to retype it for sure.
      • For the optional fields affiliation, about_me, full name, website there will be entries too.
      • For the photo, there will be only text field for outer url for now, but in the future users will be able to upload photos for themselves.
    • The register.jsp page will be able to pass it's parameters by post query to the RegisterServlet, which will check them and:
      • If the parameters are accurate (the two passwords and emails match, the username is not registered already, etc) The new user will be registered using the UserService.register method, logged in using the UserService.login method and redirected to the home page (index.jsp) with greeting.
      • If the parameters are not accurate the user will be redirected back to the register.jsp page with proper message.
    • In the login page bellow the login form there will be text and ling to the register.jsp page. The text will be something like "Not registered? Register." and the "Register" word here will be link to the register.jsp page.
  • The edit profile logic will use the edit_profile.jsp and the ProfileEditorServlet.
    • The edit_profile.jsp page will contain a form with two buttons. One will be "cancel" button that will navigate to the home page (index.jsp) without changes. The other will be "update" button that will redirect to the ProfileEditorServlet passing post parameters. The form will contain the following fields:
      • Two fields for the password one to type it and one to type it again to be sure.
      • Two fields for the email address one to type it and one to retype it for sure.
      • For the optional fields affiliation, about_me, full name, website there will be entries too.
      • For the photo_url just plain text field for now... In the future again there will be upload option too.
      • For the username there will be no field. It is permanent.
    • The ProfileEditorServlet will check it's post parameters if they are accurate (the two password fields must be the same, the two email fields too). If there are empty parameters they are not applied to the DB. Then if the parameters are ok the changes are persisted to the DB with UserService.saveChanges. If everything is ok the user will be redirected to it's home page (index.jsp) with greeting, if not it will be reredirected to edit_profile.jsp with proper warning.
    • The menu will have link to the edit_profile.jsp (see S2S_WEB_COMMONS_R1).
  • The login.jsp page will have link for lost password on it pointing to lost_password.jsp. The lost_password.jsp page will contain simple form for an registered user email and button for sending a new password. In that revision that will be all, there will be no send mail logic and generating random password/changing the old in the DB logic.

Implementation

The implementation is in 886, 887, 889, 891, 894, 895, 896, 897, 900, 904, 910, 914, 917 and 922.

Testing

User documentation

ITERATION_05/Release/UserDocumentation/11_WorkingWithSophieServer/01_CreatingAnAccountOnSophieServer?

Release documentation

Shows that a new user can be created & that logging in/logging out works correctly.

Manual tests

Testlink test ids: 773

Main tests

Testlink test ids: 773

Related tests

Testlink test ids: 323, 776, 779

Reported bugs

Give links to the tickets of the bugs found during testing

Comments

(Write comments for this or later revisions here.)