Commit b4aed304 authored by michael.simon's avatar michael.simon
Browse files

Add debugging statement with registry status change

parent 9c42194e
......@@ -263,6 +263,8 @@ public class KnowledgeSessionServiceImpl implements KnowledgeSessionService {
if (RegistryStatus.LOST_ACCESS.equals(registry.getRegistryStatus()) ||
RegistryStatus.ON_HOLD.equals(registry.getRegistryStatus())) {
if (hasAccess(objectList)) {
logger.debug("{} {} {}: registry status changed from {} to ACTIVE", new Object[] {user.getEppn(),
service.getShortName(), registry.getId(), registry.getRegistryStatus()});
registry.setRegistryStatus(RegistryStatus.ACTIVE);
registry.setLastStatusChange(new Date());
auditAccessChange(user, service, registry, false, executor);
......@@ -272,9 +274,15 @@ public class KnowledgeSessionServiceImpl implements KnowledgeSessionService {
logger.warn("Could not submit event", e);
}
}
else {
logger.debug("{} {} {}: stays in status {}", new Object[] {user.getEppn(),
service.getShortName(), registry.getId(), registry.getRegistryStatus()});
}
}
else {
if (! hasAccess(objectList)) {
logger.debug("{} {} {}: registry status changed from {} to LOST_ACCESS", new Object[] {user.getEppn(),
service.getShortName(), registry.getId(), registry.getRegistryStatus()});
registry.setRegistryStatus(RegistryStatus.LOST_ACCESS);
registry.setLastStatusChange(new Date());
auditAccessChange(user, service, registry, true, executor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment