Skip to content

Commit

Permalink
change back link in system configuration for dashboard link box MID-6174
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Apr 6, 2020
1 parent 4268973 commit 4548b96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
Expand Up @@ -6,6 +6,10 @@
*/
package com.evolveum.midpoint.web.page.self;

import com.evolveum.midpoint.gui.api.page.PageBase;

import com.evolveum.midpoint.gui.api.util.WebComponentUtil;

import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.mapper.parameter.PageParameters;
Expand All @@ -20,47 +24,22 @@
import com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb;
import com.evolveum.midpoint.web.page.admin.roles.PageRole;

@PageDescriptor(url = {"/self/profile/role"}, action = {
@PageDescriptor(url = {"/self/profile"}, action = {
@AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI,
label = PageSelf.AUTH_SELF_ALL_LABEL,
description = PageSelf.AUTH_SELF_ALL_DESCRIPTION),
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SELF_PROFILE_URL,
label = "PageRoleSelfProfile.auth.profile.label",
description = "PageRoleSelfProfile.auth.profile.description")})
public class PageSelfProfile extends PageRole {
public class PageSelfProfile extends PageBase {

public PageSelfProfile() {
super();
getRequestCycle().setResponsePage(WebComponentUtil.resolveSelfPage());
}

public PageSelfProfile(PageParameters parameters) {
super(parameters);
}

private static final long serialVersionUID = 1L;
private static final Trace LOGGER = TraceManager.getTrace(PageSelfProfile.class);

@Override
protected String getObjectOidParameter() {
return WebModelServiceUtils.getLoggedInFocusOid();
}

@Override
protected boolean isSelfProfile(){
return true;
}

@Override
protected IModel<String> createPageTitleModel() {
return createStringResource("PageAdmin.menu.profile");
}

@Override
protected void createBreadcrumb() {
super.createBreadcrumb();

Breadcrumb bc = getLastBreadcrumb();
bc.setIcon(new Model(GuiStyleConstants.CLASS_OBJECT_ROLE_ICON));
getRequestCycle().setResponsePage(WebComponentUtil.resolveSelfPage());
}

}
Expand Up @@ -172,7 +172,7 @@
</internals>
<adminGuiConfiguration>
<userDashboardLink>
<targetUrl>/self/profile/user</targetUrl>
<targetUrl>/self/profile</targetUrl>
<label>Profile</label>
<description>View/edit your profile</description>
<icon>
Expand Down

0 comments on commit 4548b96

Please sign in to comment.