}
private void setUserPermission(AccessControlledEntry object, User user, Long permission) {
if (null == getUserPermission(object, user, permission)) {
Permission p = (Permission)session.get(Permission.class, permission);
UserAccessRule entry = new UserAccessRule();
entry.setAccessControlEntry(object);
entry.setUser(user);
entry.setPermission(p);
session.save(entry);
}
}