}
private void doEmptyACLActions(WGDatabase db, CSConfig csConfig) throws WGAuthorisationException, WGBackendException, WGAPIException {
WGACL acl = db.getACL();
if (acl == null) {
_log.warn("Unable to retrieve ACL of database '" + db.getDbReference() + "' although database has ACL management feature");
return;
}
if (csConfig.getAnonymousAccessLevel() != -1) {
_log.info("Adding anonymous access level to ACL");
acl.createUserEntry(WGDatabase.ANONYMOUS_USER, csConfig.getAnonymousAccessLevel());
}
if (csConfig.getDefaultAccessLevel() != -1) {
_log.info("Adding default access level to ACL");
acl.createUserEntry("*", csConfig.getDefaultAccessLevel());
}
Iterator roles = csConfig.getRoles().iterator();
while (roles.hasNext()) {
ACLRole role = (ACLRole) roles.next();
_log.info("Adding role '" + role.getName() + "' to ACL");
acl.createRoleEntry(role.getName());
if (role.isDefaultManagerRole()) {
assingRoleToDefaultManager(db, acl, role);
}
}