Skip to content

Commit

Permalink
Merge branch 'master' into Pegas-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrGasparik committed Jun 29, 2015
2 parents 0ccb055 + a359bf0 commit 4c5509d
Show file tree
Hide file tree
Showing 23 changed files with 786 additions and 612 deletions.
Expand Up @@ -19,5 +19,4 @@ PageForgetPassword.resetPassword=Reset Password
PageForgetPassword.username=Username
PageForgetPassword.password=Password
PageForgetPassword.email=E-mail
pageForgetPassword.message.usernotfound=User Not Found
pageForgetPassword.message.ContactAdminQuestionsNotSet=You haven't set any security questions yet. Please Contact Your Administrator to reset Your Password.
pageForgetPassword.message.usernotfound=User Not Found
Expand Up @@ -16,5 +16,5 @@

page.title=Security Questions
message.WrongAnswer=Questions Not Answered Correctly


pageForgetPassword.message.ContactAdminQuestionsNotSet=You have not set any security questions yet. Please Contact Your Administrator to reset Your Password.
pageSecurityQuestions.message.WrongAnswer=Questions Not Answered Correctly
Expand Up @@ -71,6 +71,7 @@ pageTasks.category.ImportFromFile=Import from file
pageTasks.category.ImportingAccounts=Importing accounts
pageTasks.category.LiveSynchronization=Live synchronization
pageTasks.category.Reconciliation=Reconciliation
pageTasks.category.Utility=Utility
#legacy
pageTasks.category.UserRecomputation=User recomputation
pageTasks.category.Recomputation=Recomputation
Expand Down

Large diffs are not rendered by default.

Expand Up @@ -46,7 +46,8 @@ pageDebugList.message.singleShadowDeleteProblem=Couldn't delete shadow
pageDebugList.message.laxativeProblem=Drop all identities operation has not performed successfully
pageDebugList.resource=Resource
resource.nullValid=Choose resource...
pageDebugList.menu.deleteShadowsOnResource=Delete shadows on resource
pageDebugList.menu.deleteShadowsOnResource=Delete all shadows on resource
pageDebugList.message.resourceNotSelected=Resource not selected.
pageDebugList.messsage.deleteAllResourceShadows=Do your really want to delete all shadows on resource {0}?
pageDebugList.messsage.deleteAllShadowsStarted=Task which deletes all shadows on resource {0} was started.
pageDebugList.messsage.deleteAllShadowsStarted=Task which deletes all shadows on resource {0} was started.
pageDebugList.messsage.deleteAllOfType=Deleting objects of type {0}.
Expand Up @@ -160,8 +160,8 @@ private PasswordQuestionsDto loadPageModel() {

}
catch (Exception ex) {
LoggingUtils.logException(LOGGER, "Couldn't load accounts", ex);
result.recordFatalError("Couldn't load accounts", ex);
LoggingUtils.logExceptionOnDebugLevel(LOGGER, "Couldn't get user Questions, Probably not set yet", ex);

} finally {
result.recomputeStatus();
}
Expand Down Expand Up @@ -234,7 +234,7 @@ public void initLayout(){

}catch(Exception ex){
ex.printStackTrace();
LOGGER.info("\n\nAccess");

/* List<SecurityQuestionAnswerDTO> userQuestionList= model.getObject().getSecurityAnswers();
int panelNumber=0;
PrismObject<UserType> user = null;
Expand Down Expand Up @@ -386,7 +386,7 @@ public void executePasswordQuestionsAndAnswers(List<SecurityQuestionAnswerDTO> u

if(userQuestionList.get(i).getPwdQuestion().trim().compareTo(securityQuestionDefinitionType.getIdentifier().trim())==0)
{
LOGGER.debug("ilke");

SecurityQuestionAnswerDTO a=new SecurityQuestionAnswerDTO(userQuestionList.get(i).getPwdQuestion(),userQuestionList.get(i).getPwdAnswer(),userQuestionList.get(i).getQuestionItself());

a= checkIfQuestionisValidSingle(a, securityQuestionDefinitionType);
Expand All @@ -398,7 +398,7 @@ public void executePasswordQuestionsAndAnswers(List<SecurityQuestionAnswerDTO> u

}
else if(userQuestionList.get(i).getPwdQuestion().trim().compareTo(securityQuestionDefinitionType.getIdentifier().trim())!=0){
LOGGER.debug("Buraya");

SecurityQuestionAnswerDTO a=new SecurityQuestionAnswerDTO(policyQuestionList.get(panelNumber).getIdentifier(),"",policyQuestionList.get(panelNumber).getQuestionText());
a.setQuestionItself(securityQuestionDefinitionType.getQuestionText());
userQuestionList.get(i).setPwdQuestion(securityQuestionDefinitionType.getIdentifier().trim());
Expand Down
@@ -1,11 +1,7 @@
package com.evolveum.midpoint.web.page.admin.home.component;

import java.util.ArrayList;
import java.util.List;





import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.basic.Label;
Expand All @@ -16,83 +12,75 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;





import com.evolveum.midpoint.web.component.AjaxSubmitButton;
import com.evolveum.midpoint.web.component.prism.InputPanel;
import com.evolveum.midpoint.web.component.util.SimplePanel;
import com.evolveum.midpoint.web.page.admin.home.dto.PasswordQuestionsDto;
import com.evolveum.midpoint.web.page.admin.home.dto.SecurityQuestionAnswerDTO;

public class MyPasswordQuestionsPanel extends InputPanel {

public static final String F_QUESTION ="questionTF";
public static final String F_ANSWER ="answerTF";
private static final String ID_QA_PANEL="questionAnswerPanel";
PasswordQuestionsDto mod = new PasswordQuestionsDto();



public MyPasswordQuestionsPanel(String id, SecurityQuestionAnswerDTO model) {
super(ID_QA_PANEL);

// System.out.println("Question: "+model.getQuestionItself());
mod.setPwdQuestion(model.getQuestionItself());

mod.setPwdAnswer(model.getPwdAnswer());
// System.out.println("Answer: "+mod.getPwdAnswer());
initLayout();
}

public void initLayout(){
//final Label question = new Label (F_QUESTION, mod.getPwdQuestion()); //burada PropertyModel kullanmak daha doğru olur...
final Label question = new Label (F_QUESTION, new PropertyModel<PasswordQuestionsDto>(mod,PasswordQuestionsDto.F_MY_QUESTIONS__QUESTIONITSELF));
question.setOutputMarkupId(true);
add(question);

final TextField<String> answer = new TextField<String>(F_ANSWER, new PropertyModel(mod, SecurityQuestionAnswerDTO.F_PASSWORD_QUESTION_ANSWER));
answer.setRequired(true);
answer.setOutputMarkupId(true);
add(answer);

}


/*
public void initLayout(){
// final Label question = new Label (F_QUESTION, new PropertyModel(model,SecurityQuestionAnswerDTO.F_PASSWORD_QUESTION_ITSELF));
final Label question = new Label (F_QUESTION,"asfsasfd");
// final Label question = new Label (F_QUESTION, "safsdfasfsa");
question.setOutputMarkupId(true);
add(question);
//new PropertyModel<String>(mod,PasswordQuestionsDto.F_MY_QUESTIONS_ANSWER)
final TextField<String> answer = new TextField<String>(F_ANSWER,Model.of(""));
//final TextField<String> answer = new TextField<String>(F_ANSWER, new PropertyModel(model, SecurityQuestionAnswerDTO.F_PASSWORD_QUESTION_ANSWER));
answer.setRequired(true);
answer.setOutputMarkupId(true);
add(answer);
}
*/
@Override
public List<FormComponent> getFormComponents() {
List<FormComponent> list = new ArrayList<FormComponent>();
list.add((FormComponent) get(F_QUESTION));
list.add((FormComponent) get(F_ANSWER));

return list;
}

@Override
public FormComponent getBaseFormComponent() {
return (FormComponent) get(F_QUESTION);
}


}

public static final String F_QUESTION = "questionTF";
public static final String F_ANSWER = "answerTF";
private static final String ID_QA_PANEL = "questionAnswerPanel";
PasswordQuestionsDto mod = new PasswordQuestionsDto();

public MyPasswordQuestionsPanel(String id, SecurityQuestionAnswerDTO model) {
super(ID_QA_PANEL);

mod.setPwdQuestion(model.getQuestionItself());

mod.setPwdAnswer(model.getPwdAnswer());

initLayout();
}

public void initLayout() {
// final Label question = new Label (F_QUESTION, mod.getPwdQuestion());
final Label question = new Label(F_QUESTION, new PropertyModel<PasswordQuestionsDto>(mod,
PasswordQuestionsDto.F_MY_QUESTIONS__QUESTIONITSELF));
question.setOutputMarkupId(true);
add(question);

final TextField<String> answer = new TextField<String>(F_ANSWER, new PropertyModel(mod,
SecurityQuestionAnswerDTO.F_PASSWORD_QUESTION_ANSWER));
answer.setRequired(true);
answer.setOutputMarkupId(true);
add(answer);

}

/*
* public void initLayout(){
*
*
* // final Label question = new Label (F_QUESTION, new
* PropertyModel(model,SecurityQuestionAnswerDTO
* .F_PASSWORD_QUESTION_ITSELF)); final Label question = new Label
* (F_QUESTION,"asfsasfd"); // final Label question = new Label (F_QUESTION,
* "safsdfasfsa"); question.setOutputMarkupId(true); add(question); //new
* PropertyModel<String>(mod,PasswordQuestionsDto.F_MY_QUESTIONS_ANSWER)
* final TextField<String> answer = new
* TextField<String>(F_ANSWER,Model.of("")); //final TextField<String>
* answer = new TextField<String>(F_ANSWER, new PropertyModel(model,
* SecurityQuestionAnswerDTO.F_PASSWORD_QUESTION_ANSWER));
* answer.setRequired(true); answer.setOutputMarkupId(true); add(answer);
*
* }
*/
@Override
public List<FormComponent> getFormComponents() {
List<FormComponent> list = new ArrayList<FormComponent>();
list.add((FormComponent) get(F_QUESTION));
list.add((FormComponent) get(F_ANSWER));

return list;
}

@Override
public FormComponent getBaseFormComponent() {
return (FormComponent) get(F_QUESTION);
}

}
Expand Up @@ -22,7 +22,6 @@ public SecurityQuestionAnswerDTO(String passwQuestion, String passAnswer){
this.passwAnswer = passAnswer;
}
public SecurityQuestionAnswerDTO(String passwQuestion, String passAnswer,String questionitself){
System.out.println(passwQuestion +passAnswer+questionitself);
this.passwQuestionIdentifier = passwQuestion;
this.passwAnswer = passAnswer;
this.questionItself=questionitself;
Expand Down
Expand Up @@ -19,5 +19,4 @@ PageForgetPassword.resetPassword=Reset Password
PageForgetPassword.username=Username
PageForgetPassword.password=Password
PageForgetPassword.email=E-mail
pageForgetPassword.message.usernotfound=User Not Found
pageForgetPassword.message.ContactAdminQuestionsNotSet=You haven't set any security questions yet. Please Contact Your Administrator to reset Your Password.
pageForgetPassword.message.usernotfound=User Not Found

0 comments on commit 4c5509d

Please sign in to comment.