use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class ResourceDetailsTabPanel method taskDetailsPerformed.
private void taskDetailsPerformed(AjaxRequestTarget target, String taskOid) {
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, taskOid);
((PageBase) getPage()).navigateToNext(PageTaskEdit.class, parameters);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageResetPasswordConfirmation method init.
private void init(final PageParameters pageParameters) {
PageParameters params = pageParameters;
if (params == null) {
params = getPageParameters();
}
OperationResult result = new OperationResult(OPERATION_FINISH_REGISTRATION);
if (params == null) {
LOGGER.error("Confirmation link is not valid. No credentials provided in it");
String msg = createStringResource("PageSelfRegistration.invalid.registration.link").getString();
getSession().error(createStringResource(msg));
result.recordFatalError(msg);
initLayout(result);
return;
}
StringValue userNameValue = params.get(SchemaConstants.USER_ID);
Validate.notEmpty(userNameValue.toString());
StringValue tokenValue = params.get(SchemaConstants.TOKEN);
Validate.notEmpty(tokenValue.toString());
UsernamePasswordAuthenticationToken token = authenticateUser(userNameValue.toString(), tokenValue.toString(), result);
if (token == null) {
initLayout(result);
return;
} else {
// SecurityContextHolder.getContext().setAuthentication(token);
MidPointPrincipal principal = (MidPointPrincipal) token.getPrincipal();
Collection<Authorization> authz = principal.getAuthorities();
if (authz != null) {
Iterator<Authorization> authzIterator = authz.iterator();
while (authzIterator.hasNext()) {
Authorization authzI = authzIterator.next();
Iterator<String> actionIterator = authzI.getAction().iterator();
while (actionIterator.hasNext()) {
String action = actionIterator.next();
if (action.contains(AuthorizationConstants.NS_AUTHORIZATION_UI)) {
actionIterator.remove();
}
}
}
}
AuthorizationType authorizationType = new AuthorizationType();
authorizationType.getAction().add(AuthorizationConstants.AUTZ_UI_SELF_CREDENTIALS_URL);
Authorization selfServiceCredentialsAuthz = new Authorization(authorizationType);
authz.add(selfServiceCredentialsAuthz);
SecurityContextHolder.getContext().setAuthentication(token);
setResponsePage(PageResetPassword.class);
}
initLayout(result);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class PageProcessInstances method itemDetailsPerformed.
private void itemDetailsPerformed(AjaxRequestTarget target, String taskOid) {
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, taskOid);
navigateToNext(PageTaskEdit.class, parameters);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class ProcessInstancesPanel method itemDetailsPerformed.
private void itemDetailsPerformed(AjaxRequestTarget target, String pid) {
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, pid);
getPageBase().navigateToNext(PageTaskEdit.class, parameters);
}
use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.
the class TreeTablePanel method editRootPerformed.
private void editRootPerformed(SelectableBean<OrgType> root, AjaxRequestTarget target) {
if (root == null) {
root = getTreePanel().getRootFromProvider();
}
if (root.getValue() == null) {
return;
}
PageParameters parameters = new PageParameters();
parameters.add(OnePageParameterEncoder.PARAMETER, root.getValue().getOid());
getPageBase().navigateToNext(PageOrgUnit.class, parameters);
}
Aggregations