Skip to content

ConversionService should be configurable for BasicLookupStrategy and JdbcAclService #4814

@pwheel

Description

@pwheel

Summary

In #4424 I added AclClassIdUtils to handle some common logic for dealing with acl classes with types other than Long. I thought this class would be internal, then decided it was better to have it explicitly defined.

The class has package level visibility, but should be public.

Actual Behavior

Unable to define a bean of type AclClassIdUtils using Java Config as the class is not public.

Expected Behavior

Should be able to define a bean of type AclClassIdUtils using Java Config.

Configuration

@Bean
public AclClassIdUtils aclClassIdUtils() {

    AclClassIdUtils classIdUtils = new AclClassIdUtils();
    classIdUtils.setConversionService(new DefaultConversionService());
    
    return classIdUtils
}

UPDATE: This ticket's proposal changed during the time it was being implemented. Instead of exposing AclClassIdUtils as public, it was resolved to make BasicLookupStrategy and JdbcAclService expose setConversionService which they'd ultimately provide to AclClassIdUtils.

For example in BasicLookupStrategy doing:

public void setConversionService(ConversionService conversionService) {
    this.aclClassIdUtils = new AclClassIdUtils(conversionService);
}

In this way, #4424 is addressed while still keeping AclClassIdUtils package-private.

Metadata

Metadata

Assignees

Labels

in: aclAn issue in spring-security-acltype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions