List of usage examples for org.springframework.security.acls.domain AclImpl insertAce
@Override public void insertAce(int atIndexLocation, Permission permission, Sid sid, boolean granting) throws NotFoundException
From source file:org.tibetjungle.demo.service.DataSourcePopulator.java
private void grantPermissions(int contactNumber, String recipientUsername, Permission permission) { AclImpl acl = (AclImpl) mutableAclService .readAclById(new ObjectIdentityImpl(Contact.class, new Long(contactNumber))); acl.insertAce(acl.getEntries().size(), permission, new PrincipalSid(recipientUsername), true); updateAclInTransaction(acl);//from w ww.j ava 2 s . c om }