Refs #10238: Refactor Context Port Type

Task-Url: https://support.d4science.org/issues/10238

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@158791 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-11-23 16:28:30 +00:00
parent bbef5ed1d3
commit d79b91361e
2 changed files with 5 additions and 1 deletions

View File

@ -216,6 +216,7 @@ public class ContextManagement extends EntityManagement<Context> {
}else {
checkContext(null);
SecurityContext.createSecurityContext(orientGraph, uuid, true);
createVertex();
}

View File

@ -58,7 +58,6 @@ public abstract class SecurityContextMapper {
if (created) {
SecurityContext.createSecurityContext(orientGraph, ADMIN_SECURITY_CONTEXT_UUID, true);
SecurityContext.createSecurityContext(orientGraph, MANAGEMENT_SECURITY_CONTEXT_UUID, true);
DatabaseIntializator.createEntitiesAndRelations();
}
for (PermissionMode p : PermissionMode.values()) {
@ -69,6 +68,10 @@ public abstract class SecurityContextMapper {
getSecurityContextFactory(MANAGEMENT_SECURITY_CONTEXT_UUID, p, false);
}
if(created) {
DatabaseIntializator.createEntitiesAndRelations();
}
} catch (Exception e) {
logger.error("Error initializing database connection", e);
throw new RuntimeException(