Rename UserTenantAware to TenantAwareUser (#1668)

in order to be compatible with other TenantAware entities

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-02-27 08:43:40 +02:00
committed by GitHub
parent 24d70827b7
commit a0db5ff70e
5 changed files with 25 additions and 26 deletions

View File

@@ -18,7 +18,7 @@ import java.util.concurrent.Callable;
import org.eclipse.hawkbit.im.authentication.SpPermission;
import org.eclipse.hawkbit.im.authentication.TenantAwareAuthenticationDetails;
import org.eclipse.hawkbit.im.authentication.UserTenantAware;
import org.eclipse.hawkbit.im.authentication.TenantAwareUser;
import org.eclipse.hawkbit.repository.model.helper.SystemManagementHolder;
import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.core.Authentication;
@@ -163,7 +163,7 @@ public class SecurityContextSwitch {
authorities = annotation.authorities();
}
final TestingAuthenticationToken testingAuthenticationToken = new TestingAuthenticationToken(
new UserTenantAware(annotation.principal(), annotation.tenantId()),
new TenantAwareUser(annotation.principal(), annotation.tenantId()),
annotation.credentials(), authorities);
testingAuthenticationToken.setDetails(
new TenantAwareAuthenticationDetails(annotation.tenantId(), annotation.controller()));