Announcement Announcement Module
Collapse
No announcement yet.
spring security acl 3.0.5: Unable to locate a matching ACE for existing authority. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring security acl 3.0.5: Unable to locate a matching ACE for existing authority.

    Code:
    rg.springframework.security.acls.model.NotFoundException: Unable to locate a matching ACE for passed permissions and SIDs
           at org.springframework.security.acls.domain.AclImpl.isGranted(AclImpl.ja
    a:266)
           at org.springframework.security.acls.domain.AclAuthorizationStrategyImpl
    securityCheck(AclAuthorizationStrategyImpl.java:107)
           at org.springframework.security.acls.domain.AclImpl.insertAce(AclImpl.ja
    a:136)
    Code:
            final ObjectIdentity oi = new ObjectIdentityImpl(javaType, identifier);
            final Sid roleId = new GrantedAuthoritySid(grantedRole);
            MutableAcl acl = null;
            try {
                acl = (MutableAcl) this.jdbcMutableAclService.readAclById(oi);
            } catch (final NotFoundException anfe) {
                acl = this.jdbcMutableAclService.createAcl(oi);
            }
            acl.setOwner(roleId);
            acl.insertAce(acl.getEntries().size(), bp, roleId, true);
            this.jdbcMutableAclService.updateAcl(acl);
    now granted role exist in the system already. (so does it do a check for existing granted authority)?

    If a granted authority exist , what should i do?
    (i know this works if the granted role does not exist).
Working...
X