Skip to content

Commit 3ba59eb

Browse files
authored
[SYNCOPE-1948] Introducing Any Managers and removing DynRealms and DynGroups (#1295)
1 parent f00d53a commit 3ba59eb

File tree

274 files changed

+1620
-9029
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+1620
-9029
lines changed

client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMAnyDirectoryPanelAdditionalActionLinksProvider.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
100100
}, ActionLink.ActionType.ENABLE);
101101
enable.setEntitlements(IdRepoEntitlement.USER_UPDATE);
102102
enable.setOnConfirm(false);
103-
enable.setRealms(realm, model.getObject().getDynRealms());
103+
enable.setRealm(realm);
104104
actions.add(enable);
105105

106106
Action<UserTO> manageResources = new Action<>(new ActionLink<>() {
@@ -128,7 +128,7 @@ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
128128
manageResources.setEntitlements(
129129
String.format("%s,%s", IdRepoEntitlement.USER_READ, IdRepoEntitlement.USER_UPDATE));
130130
manageResources.setOnConfirm(false);
131-
manageResources.setRealms(realm, model.getObject().getDynRealms());
131+
manageResources.setRealm(realm);
132132
actions.add(manageResources);
133133

134134
Action<UserTO> manageAccounts = new Action<>(new ActionLink<>() {
@@ -149,7 +149,7 @@ public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
149149
manageAccounts.setEntitlements(String.format("%s,%s,%s",
150150
IdRepoEntitlement.USER_READ, IdRepoEntitlement.USER_UPDATE, IdMEntitlement.RESOURCE_GET_CONNOBJECT));
151151
manageAccounts.setOnConfirm(false);
152-
manageAccounts.setRealms(realm, model.getObject().getDynRealms());
152+
manageAccounts.setRealm(realm);
153153
actions.add(manageAccounts);
154154

155155
Action<UserTO> mergeAccounts = new Action<>(new ActionLink<>() {
@@ -209,7 +209,7 @@ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
209209
manageResources.setEntitlements(
210210
String.format("%s,%s", IdRepoEntitlement.GROUP_READ, IdRepoEntitlement.GROUP_UPDATE));
211211
manageResources.setOnConfirm(false);
212-
manageResources.setRealms(realm, modelObject.getDynRealms());
212+
manageResources.setRealm(realm);
213213
actions.add(manageResources);
214214

215215
return actions;
@@ -250,7 +250,7 @@ public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) {
250250
}, ActionLink.ActionType.MANAGE_RESOURCES);
251251
manageResources.setEntitlements(
252252
String.format("%s,%s", AnyEntitlement.READ.getFor(type), AnyEntitlement.UPDATE.getFor(type)));
253-
manageResources.setRealms(realm, modelObject.getDynRealms());
253+
manageResources.setRealm(realm);
254254
actions.add(manageResources);
255255
return actions;
256256
}

client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMConstants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
public final class IdMConstants {
2222

23+
public static final String PREF_CONNID_LOCATIONS_PAGINATOR_ROWS = "connid.locations.paginator.rows";
24+
2325
public static final String PREF_RECONCILIATION_PAGINATOR_ROWS = "reconciliation.paginator.rows";
2426

2527
public static final String PREF_RESOURCE_STATUS_PAGINATOR_ROWS = "resource.status.paginator.rows";

client/idm/console/src/main/java/org/apache/syncope/client/console/panels/ConnidLocations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.util.List;
2929
import org.apache.syncope.client.console.SyncopeConsoleSession;
3030
import org.apache.syncope.client.console.commons.DirectoryDataProvider;
31-
import org.apache.syncope.client.console.commons.IdRepoConstants;
31+
import org.apache.syncope.client.console.commons.IdMConstants;
3232
import org.apache.syncope.client.console.rest.ConnectorRestClient;
3333
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
3434
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
@@ -78,7 +78,7 @@ protected ConnidLocationsDataProvider dataProvider() {
7878

7979
@Override
8080
protected String paginatorRowsKey() {
81-
return IdRepoConstants.PREF_DYNREALM_PAGINATOR_ROWS;
81+
return IdMConstants.PREF_CONNID_LOCATIONS_PAGINATOR_ROWS;
8282
}
8383

8484
@Override

client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/layout/AbstractAnyFormLayout.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,22 @@ public abstract class AbstractAnyFormLayout<A extends AnyTO, F extends AnyForm<A
2828

2929
private static final long serialVersionUID = -6061683026789976508L;
3030

31+
private boolean manager = true;
32+
3133
private boolean relationships = true;
3234

3335
private final List<String> whichPlainAttrs = new ArrayList<>();
3436

3537
private final List<String> whichDerAttrs = new ArrayList<>();
3638

39+
public boolean isManager() {
40+
return manager;
41+
}
42+
43+
public void setManager(final boolean manager) {
44+
this.manager = manager;
45+
}
46+
3747
public boolean isRelationships() {
3848
return relationships;
3949
}

client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/any/AbstractGroups.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public abstract class AbstractGroups extends WizardStep implements ICondition {
3535

3636
protected final AnyTO anyTO;
3737

38-
protected WebMarkupContainer dyngroupsContainer;
39-
40-
protected WebMarkupContainer dynrealmsContainer;
41-
4238
protected WebMarkupContainer groupsContainer;
4339

4440
public <T extends AnyTO> AbstractGroups(final AnyWrapper<T> modelObject) {
@@ -70,10 +66,6 @@ public <T extends AnyTO> AbstractGroups(final AnyWrapper<T> modelObject) {
7066

7167
protected abstract void addGroupsPanel();
7268

73-
protected abstract void addDynamicRealmsContainer();
74-
75-
protected abstract void addDynamicGroupsContainer();
76-
7769
@Override
7870
public boolean evaluate() {
7971
return true;

client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/any/AbstractGroupsModel.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,4 @@ public List<MembershipTO> getMemberships() {
5555
}
5656
return memberships;
5757
}
58-
59-
public abstract List<String> getDynMemberships();
6058
}

client/idrepo/console/src/main/java/org/apache/syncope/client/console/IdRepoConsoleContext.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import org.apache.syncope.client.console.rest.AuditRestClient;
5353
import org.apache.syncope.client.console.rest.CommandRestClient;
5454
import org.apache.syncope.client.console.rest.DelegationRestClient;
55-
import org.apache.syncope.client.console.rest.DynRealmRestClient;
5655
import org.apache.syncope.client.console.rest.FIQLQueryRestClient;
5756
import org.apache.syncope.client.console.rest.GroupRestClient;
5857
import org.apache.syncope.client.console.rest.ImplementationRestClient;
@@ -234,12 +233,6 @@ public DelegationRestClient delegationRestClient() {
234233
return new DelegationRestClient();
235234
}
236235

237-
@ConditionalOnMissingBean
238-
@Bean
239-
public DynRealmRestClient dynRealmRestClient() {
240-
return new DynRealmRestClient();
241-
}
242-
243236
@ConditionalOnMissingBean
244237
@Bean
245238
public FIQLQueryRestClient fiqlQueryRestClient() {
@@ -335,7 +328,7 @@ public UserRestClient userRestClient() {
335328
public UserSelfRestClient userSelfRestClient() {
336329
return new UserSelfRestClient();
337330
}
338-
331+
339332
@ConditionalOnMissingBean
340333
@Bean
341334
public DynamicMenuStringResourceLoader dynamicMenuStringResourceLoader() {

client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoConstants.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public final class IdRepoConstants {
5454

5555
public static final String PREF_APPLICATION_PAGINATOR_ROWS = "application.paginator.rows";
5656

57-
public static final String PREF_DYNREALM_PAGINATOR_ROWS = "dynRealm.paginator.rows";
58-
5957
public static final String PREF_ACCESS_TOKEN_PAGINATOR_ROWS = "accessToken.paginator.rows";
6058

6159
public static final String PREF_COMMAND_PAGINATOR_ROWS = "command.paginator.rows";

client/idrepo/console/src/main/java/org/apache/syncope/client/console/layout/GroupFormLayoutInfo.java

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,16 @@ public class GroupFormLayoutInfo extends AbstractAnyFormLayout<GroupTO, GroupFor
2626

2727
private static final long serialVersionUID = -5573691733739618500L;
2828

29-
private boolean ownership = true;
30-
31-
private boolean dynamicMemberships = true;
32-
3329
private boolean typeExtensions = true;
3430

3531
@Override
3632
protected Class<? extends GroupForm> getDefaultFormClass() {
3733
return GroupWizardBuilder.class;
3834
}
3935

40-
public boolean isOwnership() {
41-
return ownership;
42-
}
43-
44-
public void setOwnership(final boolean ownership) {
45-
this.ownership = ownership;
46-
}
47-
48-
public boolean isDynamicMemberships() {
49-
return dynamicMemberships;
50-
}
51-
52-
public void setDynamicMemberships(final boolean dynamicMemberships) {
53-
this.dynamicMemberships = dynamicMemberships;
36+
@Override
37+
public boolean isGroups() {
38+
return false;
5439
}
5540

5641
public boolean isTypeExtensions() {
@@ -60,5 +45,4 @@ public boolean isTypeExtensions() {
6045
public void setTypeExtensions(final boolean typeExtensions) {
6146
this.typeExtensions = typeExtensions;
6247
}
63-
6448
}

client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/Security.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@
2424
import org.apache.syncope.client.console.BookmarkablePageLinkBuilder;
2525
import org.apache.syncope.client.console.SyncopeConsoleSession;
2626
import org.apache.syncope.client.console.panels.DelegationDirectoryPanel;
27-
import org.apache.syncope.client.console.panels.DynRealmDirectoryPanel;
2827
import org.apache.syncope.client.console.panels.RoleDirectoryPanel;
2928
import org.apache.syncope.client.console.panels.SecurityQuestionsPanel;
3029
import org.apache.syncope.client.console.rest.DelegationRestClient;
31-
import org.apache.syncope.client.console.rest.DynRealmRestClient;
3230
import org.apache.syncope.client.console.rest.RealmRestClient;
3331
import org.apache.syncope.client.console.rest.RoleRestClient;
3432
import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
@@ -59,9 +57,6 @@ public class Security extends BasePage {
5957
@SpringBean
6058
protected DelegationRestClient delegationRestClient;
6159

62-
@SpringBean
63-
protected DynRealmRestClient dynRealmRestClient;
64-
6560
@SpringBean
6661
protected SecurityQuestionRestClient securityQuestionRestClient;
6762

@@ -98,7 +93,6 @@ public Panel getPanel(final String panelId) {
9893
new RoleTO(),
9994
roleRestClient,
10095
realmRestClient,
101-
dynRealmRestClient,
10296
getPageReference()), true).build(panelId);
10397
}
10498
});
@@ -123,20 +117,6 @@ public Panel getPanel(final String panelId) {
123117
}
124118
});
125119

126-
tabs.add(new AbstractTab(new ResourceModel("dynRealms")) {
127-
128-
private static final long serialVersionUID = -6815067322125799251L;
129-
130-
@Override
131-
public Panel getPanel(final String panelId) {
132-
return new DynRealmDirectoryPanel.Builder(dynRealmRestClient, getPageReference()) {
133-
134-
private static final long serialVersionUID = -5960765294082359003L;
135-
136-
}.build(panelId);
137-
}
138-
});
139-
140120
tabs.add(new AbstractTab(new ResourceModel("securityQuestions")) {
141121

142122
private static final long serialVersionUID = -6815067322125799251L;

0 commit comments

Comments
 (0)