Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into access-certification
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Oct 28, 2015
2 parents e6f204e + 532be79 commit 4c6cdea
Show file tree
Hide file tree
Showing 9 changed files with 2,530 additions and 2,480 deletions.
Expand Up @@ -248,9 +248,11 @@ protected void handleNotSuccessOrHandledErrorInIterator(OperationResult result)
}
};

Collection<SelectorOptions<GetOperationOptions>> options =
SelectorOptions.createCollection(ResourceType.F_CONNECTOR, GetOperationOptions.createResolve());
provider.setOptions(options);
//fixes MID-2534;
// connector reference is set in the ResourceDto constructor
// Collection<SelectorOptions<GetOperationOptions>> options =
// SelectorOptions.createCollection(ResourceType.F_CONNECTOR, GetOperationOptions.createResolve());
// provider.setOptions(options);
provider.setQuery(createQuery());

return provider;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2013 Evolveum
* Copyright (c) 2010-2015 Evolveum
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.web.application.PageDescriptor;
import com.evolveum.midpoint.web.page.PageBase;
import com.evolveum.midpoint.web.page.admin.home.PageDashboard;
Expand All @@ -31,6 +33,7 @@
import com.evolveum.midpoint.web.security.SecurityUtils;
import com.evolveum.midpoint.web.util.WebMiscUtil;
import com.evolveum.midpoint.xml.ns._public.common.common_3.CredentialsPolicyType;

import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.PasswordTextField;
import org.apache.wicket.markup.html.form.RequiredTextField;
Expand All @@ -43,6 +46,8 @@
@PageDescriptor(url = "/login")
public class PageLogin extends PageBase {

private static final Trace LOGGER = TraceManager.getTrace(PageLogin.class);

PageBase page = getPageBase();
private static final String ID_LOGIN_FORM = "loginForm";

Expand Down Expand Up @@ -79,23 +84,19 @@ protected void onSubmit() {
};
OperationResult parentResult = new OperationResult(OPERATION_LOAD_RESET_PASSWORD_POLICY);

CredentialsPolicyType creds = null;
try {
CredentialsPolicyType creds = getModelInteractionService().getCredentialsPolicy(null, (Task) null, parentResult);
BookmarkablePageLink<String> link = new BookmarkablePageLink<String>("forgetpassword", PageForgetPassword.class);
boolean linkIsVisible = false;
if (creds != null) {
if (creds.getSecurityQuestions().getQuestionNumber() != null) {
linkIsVisible = true;

}

}
link.setVisible(linkIsVisible);
form.add(link);
creds = getModelInteractionService().getCredentialsPolicy(null, (Task) null, parentResult);
} catch (ObjectNotFoundException | SchemaException e) {
// TODO Auto-generated catch block
e.printStackTrace();
LOGGER.warn("Cannot read credentials policy: "+e.getMessage(), e);
}
BookmarkablePageLink<String> link = new BookmarkablePageLink<String>("forgetpassword", PageForgetPassword.class);
boolean linkIsVisible = false;
if (creds != null && creds.getSecurityQuestions() != null && creds.getSecurityQuestions().getQuestionNumber() != null) {
linkIsVisible = true;
}
link.setVisible(linkIsVisible);
form.add(link);

form.add(new RequiredTextField(ID_USERNAME, new Model<String>()));
form.add(new PasswordTextField(ID_PASSWORD, new Model<String>()));
Expand Down
Expand Up @@ -281,7 +281,8 @@ private PasswordAccountDto createPasswordAccountDto(PrismObject<ShadowType> acco
private void onSavePerformed(AjaxRequestTarget target) {
List<PasswordAccountDto> selectedAccounts = getSelectedAccountsList();

if (model.getObject().getPasswordChangeSecurity().equals(PasswordChangeSecurityType.OLD_PASSWORD)) {
if ((model.getObject().getPasswordChangeSecurity() == null) || (model.getObject().getPasswordChangeSecurity() != null &&
model.getObject().getPasswordChangeSecurity().equals(PasswordChangeSecurityType.OLD_PASSWORD))) {
LOGGER.debug("Check old password");
if (model.getObject().getOldPassword() == null
|| model.getObject().getOldPassword().trim().equals("")){
Expand Down Expand Up @@ -344,6 +345,11 @@ private void onSavePerformed(AjaxRequestTarget target) {

result.recordSuccess();
} catch (Exception ex) {
MyPasswordsDto dto = model.getObject();
ProtectedStringType password = dto.getPassword();
if (password != null){
password.setEncryptedData(null);
}
LoggingUtils.logException(LOGGER, "Couldn't save password changes", ex);
result.recordFatalError("Couldn't save password changes.", ex);
} finally {
Expand Down
Expand Up @@ -76,7 +76,7 @@ protected void initLayout() {
oldPasswordField.setResetPassword(false);
add(oldPasswordField);

if (model.getObject().getPasswordChangeSecurity() == null ||
if (model.getObject().getPasswordChangeSecurity() != null &&
model.getObject().getPasswordChangeSecurity().equals(PasswordChangeSecurityType.NONE)){
oldPasswordField.setVisible(false);
oldPasswordLabel.setVisible(false);
Expand Down
Expand Up @@ -1055,7 +1055,7 @@ PageAdmin.menu.top.certification.decisions=My cases to decide
PageAdmin.menu.top.certification.definitions=Campaign definitions
PageAdmin.menu.top.certification.newDefinition=New campaign definition
PageAdmin.menu.top.configuration.about=About
PageAdmin.menu.top.configuration.basic=Basic
PageAdmin.menu.top.configuration.basic=System
PageAdmin.menu.top.configuration.bulkActions=Bulk actions
PageAdmin.menu.top.configuration=Configuration
PageAdmin.menu.top.configuration.configuration=Configuration
Expand Down
Expand Up @@ -50,6 +50,7 @@ AEPlevel.LEGALIZE=Relative
AEPlevel.MARK=Mark
AEPlevel.NONE=None
AEPlevel.POSITIVE=Positive
assignablePopupContent.button.assign=Assign
assignablePopupContent.button.add=Add
assignablePopupContent.description=Description
assignablePopupContent.displayName=Display name
Expand Down Expand Up @@ -1054,7 +1055,7 @@ PageAdmin.menu.top.certification.decisions=My cases to decide
PageAdmin.menu.top.certification.definitions=Campaign definitions
PageAdmin.menu.top.certification.newDefinition=New campaign definition
PageAdmin.menu.top.configuration.about=About
PageAdmin.menu.top.configuration.basic=Basic
PageAdmin.menu.top.configuration.basic=System
PageAdmin.menu.top.configuration.bulkActions=Bulk actions
PageAdmin.menu.top.configuration=Configuration
PageAdmin.menu.top.configuration.configuration=Configuration
Expand All @@ -1063,6 +1064,8 @@ PageAdmin.menu.top.configuration.expressionEvaluator=Expression evaluator
PageAdmin.menu.top.configuration.importObject=Import object
PageAdmin.menu.top.configuration.internals=Internals configuration
PageAdmin.menu.top.configuration.logging=Logging
PageAdmin.menu.top.configuration.notifications=Notifications
PageAdmin.menu.top.configuration.profiling=Profiling
PageAdmin.menu.top.configuration.repositoryObjects=Repository objects
PageAdmin.menu.top.configuration.security=Security
PageAdmin.menu.top.configuration.shadowsDetails=Shadows details
Expand Down Expand Up @@ -1107,6 +1110,7 @@ pageAdminFocus.title.newFocusType=Create
pageAdminFocus.message.illegalAccountState=Illegal shadow state '{0}'.
pageAdminFocus.message.illegalAccountState=Illegal assignment state '{0}'.
pageAdminFocus.message.noAssignmentsAvailable=There are currently no assignments to preview.
pageAdminFocus.message.noOrgSelected=No organization was selected.
pageAdminFocus.menu.assignShadow=Assign resource
pageAdminFocus.menu.assignRole=Assign role
pageAdminFocus.menu.assignOrg=Assign org. unit
Expand All @@ -1117,17 +1121,20 @@ pageAdminFocus.button.disable=Disable
pageAdminFocus.button.unlink=Unlink
pageAdminFocus.button.unlock=Unlock
pageAdminFocus.button.delete=Delete
pageAdminFocus.button.addToOrg=Add to organization
pageAdminFocus.focusDetails=Details
pageAdminFocus.projections=Projections
pageAdminFocus.organizations=Organizations
pageAdminFocus.message.couldntCreateAccountNoSchema=Couldn't create projection form for '{0}', no refined schema available. Possible problem with connector configuration and/or connection. Please check logs for more information.
pageAdminFocus.message.couldntCreateAccountNoAccountSchema=Couldn't create projection form for '{0}', no schema for default 'account' object type available. Possible problem with resource configuration. Please check logs for more information.
pageAdminFocus.message.couldntCreateAccount=Couldn't create projection form for '{0}', reason: {1}.
pageAdminFocus.message.noAssignableSelected=No assignment selected.
pageAdminFocus.message.couldntAssignObject=Couldn't assign object '{0}', reason: {1}.
pageAdminFocus.message.noActivationFound=No activation found for projection '{0}'.
pageAdminFocus.message.noEnabledPropertyFound=No enabled property found for account '{0}'.
pageAdminFocus.message.noAccountSelected=No projection selected.
pageAdminFocus.message.noAssignmentSelected=No assignment selected.
pageAdminFocus.title.selectResourceSelect resource(s)
pageAdminFocus.title.selectResource=Select resource(s)
pageAdminFocus.title.selectAssignable=Select object(s)
pageAdminFocus.task.name=Task name
pageAdminFocus.task.category=Category
Expand Down Expand Up @@ -1556,7 +1563,7 @@ PageMyPasswords.button.back=Back
PageMyPasswords.button.save=Save
PageMyPasswords.couldntResolve=Couldn't resolve resource.
PageMyPasswords.enabled=Enabled
PageMyPasswords.importantNote=Important note. When "MidPoint" account is checked, user password is changed. Besides that, all account credentials are updated based on policies defined in resources definitions.
PageMyPasswords.importantNote=If selected, user password and all accounts' credentials will be updated based on policies defined in resources definitions.
PageMyPasswords.name=Name
PageMyPasswords.noAccountSelected=Password not changed. No account was selected.
PageMyPasswords.password=Password
Expand Down Expand Up @@ -1664,6 +1671,7 @@ pageResource.overallStatus=Overall status
pageResource.progress=Progress
pageResource.resource=Resource
pageResources.bundle=Bundle
pageResources.connectorType=Connector type
pageResources.button.discoveryRemote=Discovery
pageResources.button.editAsXml=Edit XML
pageResources.button.search=Search
Expand Down Expand Up @@ -1747,6 +1755,7 @@ pageSystemConfiguration.assignmentPolicyEnforcement.value.mark=Mark
pageSystemConfiguration.assignmentPolicyEnforcement.value.none=None
pageSystemConfiguration.assignmentPolicyEnforcement.value.positive=Positive
pageSystemConfiguration.logging.title=Logging
pageSystemConfiguration.notifications.title=Notifications
pageSystemConfiguration.profiling.title=Profiling
PageSystemConfiguration.subTitle=for midPoint
pageSystemConfiguration.system.title=System
Expand All @@ -1772,6 +1781,7 @@ pageTask.cronHelpLink=For more information, please see
pageTask.cronHelpLinkTutorial=tutorial
pageTask.cronSpec=Schedule cron-like specification
pageTask.dryRun=Dry run
pageTask.focusType=Applicable to type
pageTaskEdit.basic=Basic
pageTaskEdit.boundHelp=Tightly bound tasks are used to run short actions, which are repeating quite often (e.g. in intervals less than 1 minute). A typical example is the live synchronization. Cron-like specification is not supported for these tasks; you have to specify the time interval.
pageTaskEdit.bound=Tightly bound (use if recurring task runs often)
Expand Down Expand Up @@ -2039,6 +2049,8 @@ pageWorkItem.trackingData.description=Tracking (diagnostic) data
pageWorkItem.trackingData=Tracking data
pageWorkItem.workItemCreatedOn=This work item created on\:
passwordPanel.error=Passwords don't match.
passwordPanel.passwordChange=Change
passwordPanel.passwordSet=password is set
past.ChangeType.ADD=Added
past.ChangeType.DELETE=Deleted
past.ChangeType.MODIFY=Modified
Expand Down Expand Up @@ -2440,8 +2452,20 @@ SynchronizationInformationPanel.protected=Protected
SynchronizationInformationPanel.state=State
SynchronizationInformationPanel.synchronizationDisabled=Sync disabled
SynchronizationInformationPanel.title=States of processed objects
SynchronizationInformationPanel.discoveryWarning=(The following numbers may include processing triggered by the discovery mechanism.)
SynchronizationInformationPanel.unlinked=Unlinked
SynchronizationInformationPanel.unmatched=Unmatched
ActionsExecutedInformationPanel.title=Actions executed
ActionsExecutedInformationPanel.showingResultingActionsOnly=Showing "resulting actions" only. E.g. user ADD and MODIFY in one synchronization operation is shown as ADD.
ActionsExecutedInformationPanel.showingAllActions=Showing all executed actions.
ActionsExecutedInformationPanel.changeShowingActions=Change it.
ActionsExecutedInformationPanel.objectType=Object type
ActionsExecutedInformationPanel.operation=Operation
ActionsExecutedInformationPanel.channel=Channel
ActionsExecutedInformationPanel.successCount=Count (OK)
ActionsExecutedInformationPanel.lastSuccessObject=Last (OK)
ActionsExecutedInformationPanel.lastSuccessTimestamp=Time
ActionsExecutedInformationPanel.failureCount=Count (failure)
SynchronizationPolicyDecision.ADD=Add
SynchronizationPolicyDecision.DELETE=Delete
SynchronizationPolicyDecision.KEEP=No change
Expand Down Expand Up @@ -2536,6 +2560,7 @@ SystemConfigPanel.title.misc=Miscellaneous
SystemConfigPanel.title.modelHooks=Model hooks
SystemConfigPanel.title.notification=Notifications
SystemConfigPanel.title.passwordPolicy=Global password policy
SystemConfigPanel.title.securityPolicy=Global security policy
SystemConfigPanel.title.userTemplate=Default user template
SystemConfigPanel.tooltip.duration=Format: P[n][p], n-number, p-period (d - days, m - months, ...), P3M - cleanup every 3 months
SystemInfoPanel.cpuUsage=CPU Usage
Expand Down Expand Up @@ -2665,6 +2690,7 @@ UploadPanel.message.removeSuccess=File was removed.
UploadPanel.message.uploadError=File upload failed. Try again please.
UploadPanel.message.uploadSuccess=File upload was successful. Continue with editing and press 'Save' when done.
UploadPanel.upload.tooltip=Upload file
UploadPanel.download.tooltip=Download file
userBrowserDialog.button.cancelButton=Cancel
userBrowserDialog.button.addButton=Add
userBrowserDialog.button.searchButton=Search
Expand Down Expand Up @@ -2751,7 +2777,22 @@ PageAdmin.menu.top.roles.edit=Edit role
PageAdmin.menu.top.users.org.edit=Edit organization
PageSelfCredentials.tabs.password=Password
PageSelfCredentials.title=Credentials
PageSelfCredentials.oldPasswordLabel=Old password
PageSelfCredentials.passwordLabel1=Password
PageSelfCredentials.passwordLabel2=Confirm password
ChangePasswordPanel.accountsTable.header=Accounts
ChangePasswordPanel.label.changeAllPasswords=Keep all passwords the same
PageSelfCredentials.accountMidpoint=MidPoint
PageSelfCredentials.resourceMidpoint=MidPoint Repository
PageSelfCredentials.noAccountSelected=Password not changed. No account was selected.
PageSelfCredentials.incorrectOldPassword=Password not changed. Old password is incorrect.
PageSelfCredentials.specifyOldPasswordMessage=Please, specify old password value
ChangePasswordPanel.accountsTable.header=Password propagation
ChangePasswordPanel.name=Name
ChangePasswordPanel.resourceName=Resource
ChangePasswordPanel.enabled=Enabled
ChangePasswordPanel.legendMessage.selected= - Password will be changed
ChangePasswordPanel.legendMessage.propagated= - Password might to be changed (based on policies defined in resources definitions)
ChangePasswordPanel.legendMessage.deselected= - Password will not be changed
PageBase.button.tooltip.clearSearch=Clear
mainForm.uploadTooLarge = Upload must be less than ${maxSize}.
mainForm.uploadFailed = File failed to upload: ${exception.localizedMessage}PageSelfCredentials.couldntResolve=Couldn't resolve resource.
PageSelfCredentials.couldntResolve=Couldn't resolve resource.

0 comments on commit 4c6cdea

Please sign in to comment.