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)now granted role exist in the system already. (so does it do a check for existing granted authority)?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);
If a granted authority exist , what should i do?
(i know this works if the granted role does not exist).


Reply With Quote
