if (aclEntry == null) {
acl.createUserEntry(domain.getDefaultManager(), WGDatabase.ACCESSLEVEL_MANAGER);
}
// Modify flags to include role and store
WGACLEntryFlags flags = acl.parseFlags(aclEntry);
if (!flags.getRoles().contains(role.getName())) {
flags.getRoles().add(role.getName());
}
aclEntry.setFlags(flags.toString());
acl.save(aclEntry);
}
catch (WGAPIException e) {
_log.error("Error assigning role '" + role.getName() + "' to default manager for database '" + db.getDbReference() + "'", e);