sysadmin.setInitials("SYS");
sysadmin.setPassword("1tGWp1Bdm02Sw4bD7/o0N2ao405Tf8kjxGBW/A=="); // password=admin
sysadmin.setLastUpdateTime(new Date());
session.save(sysadmin);
}
Role viewerRole = initializeRole(session, "viewer", 1, 8);
Role editorRole = initializeRole(session, "editor", 2, 7);
Role adminRole = initializeRole(session, "admin", 3, 6);
Role sysadminRole = initializeRole(session, "sysadmin", 4, 5);
addRoleAssociation(session, sysadminRole.getId(), sysadmin.getId(), 0);
createPermission(session, sysadminRole, "%", "%");
createPermission(session, adminRole, "%", "admin%");
createPermission(session, editorRole, "%", "create%");
createPermission(session, editorRole, "%", "edit%");
createPermission(session, editorRole, "%", "integrate%");