Refactoring/Improving source: security core (#1599) (#1600)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-02-03 17:03:08 +02:00
committed by GitHub
parent 9e31685757
commit 9631292934
2 changed files with 3 additions and 7 deletions

View File

@@ -14,8 +14,7 @@ import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.GrantedAuthority;
@@ -32,10 +31,9 @@ import org.springframework.security.core.GrantedAuthority;
* etc.
* </p>
*/
@Slf4j
public final class SpPermission {
private static final Logger LOGGER = LoggerFactory.getLogger(SpPermission.class);
/**
* Permission to read the targets (list and filter).
*/
@@ -147,7 +145,7 @@ public final class SpPermission {
final String role = (String) field.get(null);
allPermissions.add(role);
} catch (final IllegalAccessException e) {
LOGGER.error(e.getMessage(), e);
log().error(e.getMessage(), e);
}
}
}

View File

@@ -22,8 +22,6 @@ import lombok.extern.slf4j.Slf4j;
import org.eclipse.hawkbit.im.authentication.TenantAwareAuthenticationDetails;
import org.eclipse.hawkbit.im.authentication.SpPermission.SpringEvalExpressions;
import org.eclipse.hawkbit.tenancy.TenantAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;