Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ScimUserProvisioning Dependency Injection #2796

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

adrianhoelzl-sap
Copy link
Contributor

@adrianhoelzl-sap adrianhoelzl-sap commented Mar 23, 2024

No description provided.

Add qualifier for TimeService component
@adrianhoelzl-sap adrianhoelzl-sap added the DO NOT MERGE Internal Test or WIP, please DO NOT MERGE label Mar 23, 2024
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/187298342

The labels on this github issue will be updated when the story is started.

@@ -1,4 +1,7 @@
package org.cloudfoundry.identity.uaa.util;

import org.springframework.stereotype.Component;

@Component("timeService")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure this is not needed because of interface

final IdentityZoneManager identityZoneManager,
final JdbcIdentityZoneProvisioning jdbcIdentityZoneProvisioning
@Qualifier("identityZoneProvisioning") final JdbcIdentityZoneProvisioning jdbcIdentityZoneProvisioning,
@Qualifier("timeService") final TimeService timeService,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see other comment you can omit timeService qulifier , similar to IdentityZoneManager

@@ -137,7 +137,7 @@ public class ScimUserEndpoints implements InitializingBean, ApplicationEventPubl
public ScimUserEndpoints(
final IdentityZoneManager identityZoneManager,
final IsSelfCheck isSelfCheck,
final ScimUserProvisioning scimUserProvisioning,
final @Qualifier("scimUserProvisioning") ScimUserProvisioning scimUserProvisioning,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using 2 time same scimUserProvisioning qualifier ?

@@ -137,7 +137,7 @@ public class ScimUserEndpoints implements InitializingBean, ApplicationEventPubl
public ScimUserEndpoints(
final IdentityZoneManager identityZoneManager,
final IsSelfCheck isSelfCheck,
final ScimUserProvisioning scimUserProvisioning,
final @Qualifier("scimUserProvisioning") ScimUserProvisioning scimUserProvisioning,
final IdentityProviderProvisioning identityProviderProvisioning,
final @Qualifier("scimUserProvisioning") ResourceMonitor<ScimUser> scimUserResourceMonitor,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using 2 time same scimUserProvisioning qualifier ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JdbcScimUserProvisioning class also implements the ResourceManager interface and is used as the implementation to this interface here.

@@ -536,18 +529,11 @@ protected int deleteUser(String userId, int version, String zoneId) {
return updated;
}

@VisibleForTesting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not simply protected then from test class it is reachable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with commit df4592f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE Internal Test or WIP, please DO NOT MERGE unscheduled
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants