GENESIIS / campus

0 stars 0 forks source link

C18-student : signup : without using third party application #18

Open HimashaFernando opened 7 years ago

HimashaFernando commented 7 years ago

Business benefit : A user can register in campus.lk as a public student user and use his/her created profile to log in to the system so that he/she can interact with the system to view course details, apply for courses, get instant alerts from the system about recent education information and get more discounts/promotions on education industry.

Reqm :

  1. User Password encryption. Get User entered password and encrypt it, then match with DB password.
  2. User Validation. If user's password match, then check active or valid user.
  3. User Interface privileges. Get user has access interfaces.
  4. User action privileges. Get user's privilege interface of action performs.
  5. If logged valid user, then update user details. User public IP, Browser details, logged date/time.
  6. Email verification.

UI pages :

  1. sign up page

Estimation: UI - 32sp Dev - 64sp Testing - 64sp

dushanthacb commented 7 years ago

201611180940-DN sample mock-up : without using third party application

image

tharinduw commented 7 years ago

DN -

we need to include

) interests

) town

Is UN a key in DB ?

On 18/11/2016 9:46 AM, Dushantha Nayanajith Chandima Batuwita wrote:

201611180940-DN /sample mock-up : without using third party application/

image https://cloud.githubusercontent.com/assets/20038535/20418485/cc504f1c-ad73-11e6-83a7-075fb142f5c3.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GENESIIS/campus/issues/18#issuecomment-261445003, or mute the thread https://github.com/notifications/unsubscribe-auth/AJwhb65zJgnM9H_Q78V57MKb3kLiq0cDks5q_SaRgaJpZM4KyZwj.

dushanthacb commented 7 years ago

201611291900-DN please kindly review the code and pass to @jayani1991 for code review

dushanthacb commented 7 years ago

201611292324-DN

scope

this issue manages the sinning up process for students without third party application.Since the newly

  1. signing up person is not registered with the system yet, we expect him to submit unique email.username for the signing up.
  2. system should validate if the user name and email address exists with in the system (t:Student).If exists system refrain from allowing the user to create an account.
  3. If the credentials he entered are unique then an account is created for him.
  4. In both cases the system provides the status of the account creation.
  5. system should validate the validity of the insertion via front end and back end. If fails appropriate message will be provided.
  6. mobile phone number should be broken down in to country code network code and the phone number. And the data base should be inserted accordingly.

.Grade of risk of change low

Sprint released Sprint 2

Unit Test Done

Change/Add Files

/campus.jar/src/com/genesiis/campus/validation/Validatory.java (interface)
/campus.jar/src/com/genesiis/campus/validation/PrevalentValidation.java
/campus.war/web/dist/js/institute/validation/validation.js
campus.war/src/com/genesiis/campus/studentController/StudentController.java
src/com/genesiis/campus/util/security/Encryptable.java
/src/com/genesiis/campus/util/security/TripleDesEncryptor.java
src/com/genesiis/campus/entity/SigningUpStudentDAO.java
src/com/genesiis/campus/command/CmdSignUpWithoutThirdParty.java
/campus.jar/src/com/genesiis/campus/StudentController/StudentController.java
/campus.war/web/dist/js/signUpWoThirdParty.js
/campus.war/web/dist/js/jsonDataExchanger.js
/campus.war/web/dist/partials/signUpWoThirdParty.jsp
src/com/genesiis/campus/util/RowStudentForJason.java

prerequisite

Traverse to the destination http://www.campus.dev:8080/dist/partials/signUpWoThirdParty.jsp where the landing for this issue is.fill in the required requested data and hit enter.

tharakaGen commented 7 years ago

capmus-student-signup

pabodhaW commented 7 years ago

201612011600 PN Code review comments.

Improvements

  1. signUpWoThirdParty.js validateSignUpWoThirdPartyPageEmbedData() method. else{} part is confusing. Remove it and rerun the variable.
function validateSignUpWoThirdPartyPageEmbedData(){
    var validationPass = true;
    if(!(isFieldFilled(isempty($('#firstName').val()),"First Name Field","firstNameError"))){
        return !validationPass;
    } else if (!(isFieldFilled(isempty($('#lastName').val()),"Last Name Field","lastNameError"))) {
    ...
    } else{
        return validationPass;
    }   
}
  1. CmdGenerateEmail.execute() exception handling needs to modify in a better way.
    public IView execute(IDataHelper helper, IView view) throws SQLException,
            Exception {     
            ...
         } catch (MessagingException msgexp){
             log.error("execute():MessagingException "+msgexp.toString());
             throw msgexp;
         } catch (SQLException sqle) {
             log.error("execute():SQLException "+ sqle.toString());
             throw sqle;
        } catch (PrevalentValidation.FailedValidationException e){
            log.error("execute():FailedValidationException "+e.toString());
            message = e.toString();     
            message = message.substring(message.lastIndexOf(":") + 1);
            setFrontEndViewingDataIfValidationFails(helper,view);
        }catch (IOException ioExpe) {
            log.error("execute():IOException " + ioExpe.toString());
            throw ioExpe;
        } catch (Exception e) {
            log.error("execute():Exception " + e.toString());
            throw e;
        } finally {
            if(!connection.isClosed())connection.close();
            helper.setAttribute("message", message);
        }
             return view;
    }
  1. CmdGenerateEmail.java class remove unwanted comments.

  2. remove CmdValidateStudentPassword.java class

  3. CmdSignUpWithoutThirdParty.java class has no header comments.

  4. Refer SystemConfigDAO.java class placed in issue c27 written by MM. Check if the class can be reused within this issue.

  5. SigningUpStudentDAO.userNameAndEmailExist() remove logger message if not necessary.

  6. Student.java, RowStudentForJason.java make the fields private.

  7. TripleDesEncryptor.java class has System.out statements. Remove them and use log4j.

    1. TripleDesEncryptor.java add more method comments.

@dushanthacb FYA

dushanthacb commented 7 years ago

201612021313-DN @pabodhaW

All the CREV comments but comment 6 have been corrected. It's due to the fact that the code checks more than one values hence, as suggest, the code of MM can not be taken unless two calls to data base is sent.

Since new requirement have been brought to light, I will complete those too and forward to CREV again.

Add town column to the UI and populate all the available towns for users selection involves CMD class coding /DAO/utility class coding/ front end displaying and testing

Redirect the student to the login page on success full account creation 24o's integrate with the UI 8o's