apache / apache/grails-core

Exception thrown when using domain classes with UUID(String) Primary Keys.

Open
#15,924 0 comments 0 reactions 0 assignees View on GitHub
relates-to:spring-security
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

When i call
```
aclService.createAcl(
objectIdentityRetrievalStrategy.getObjectIdentity(report)
)
```
with the report domain having a UUID primary key, i get the exception,

`Argument [grails.plugin.springsecurity.acl.AclSid(sid:admin, principal:true, id:null, properties:[sid:admin, principal:true], dirty:false, dirtyPropertyNames:[], attached:false, errors:org.grails.datastore.mapping.validation.ValidationErrors: 0 errors)] is not an instance of [class grails.plugin.springsecurity.acl.AclSid] which this validator is configured for`

Anybody experienced this or has anybody used this plugin with String identifiers?

Contributor guide

Open the contributing guide

Research direction

Start with the reported aclService.createAcl call and the validator exception when a domain class uses a UUID primary key. Reproduce the failure with a UUID(String) identifier and inspect the ACL validation path; done means ACL creation accepts the domain class without the reported type mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.