diff --git a/cadc-tap-schema/build.gradle b/cadc-tap-schema/build.gradle index 5b941c81..8f669c24 100644 --- a/cadc-tap-schema/build.gradle +++ b/cadc-tap-schema/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '1.2.1' +version = '1.2.2' description = 'OpenCADC TAP-1.1 tap schema server library' def git_url = 'https://github.com/opencadc/tap' diff --git a/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/GetPermissionsAction.java b/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/GetPermissionsAction.java index 6a461693..d1c65e8a 100644 --- a/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/GetPermissionsAction.java +++ b/cadc-tap-schema/src/main/java/ca/nrc/cadc/vosi/actions/GetPermissionsAction.java @@ -67,6 +67,8 @@ package ca.nrc.cadc.vosi.actions; +import ca.nrc.cadc.auth.AuthenticationUtil; +import ca.nrc.cadc.auth.IdentityManager; import ca.nrc.cadc.rest.InlineContentHandler; import ca.nrc.cadc.tap.schema.TapPermissions; import ca.nrc.cadc.tap.schema.TapSchemaDAO; @@ -99,7 +101,7 @@ public void doAction() throws Exception { } log.debug("name: " + name); - checkWritable(); + checkReadable(); TapSchemaDAO dao = getTapSchemaDAO(); TapPermissions permissions = null; @@ -137,10 +139,8 @@ private String getOwnerString(Subject s) { if (s == null) { return ""; } - if (s.getPrincipals(X500Principal.class).size() > 0) { - return s.getPrincipals(X500Principal.class).iterator().next().getName(); - } - return ""; + IdentityManager im = AuthenticationUtil.getIdentityManager(); + return im.toDisplayString(s); } private String getGroupString(GroupURI group) { diff --git a/youcat/VERSION b/youcat/VERSION index 31a7822c..e7135390 100644 --- a/youcat/VERSION +++ b/youcat/VERSION @@ -1,6 +1,6 @@ ## deployable containers have a semantic and build tag # semantic version tag: major.minor # build version tag: timestamp -VER=0.7.0 +VER=0.7.1 TAGS="${VER} ${VER}-$(date --utc +"%Y%m%dT%H%M%S")" unset VER diff --git a/youcat/src/main/java/org/opencadc/youcat/CatalogTapService.java b/youcat/src/main/java/org/opencadc/youcat/CatalogTapService.java index 2c15432f..0abaed40 100644 --- a/youcat/src/main/java/org/opencadc/youcat/CatalogTapService.java +++ b/youcat/src/main/java/org/opencadc/youcat/CatalogTapService.java @@ -127,13 +127,11 @@ public Availability getStatus() { boolean isGood = true; String note = "service is accepting queries"; try { - String state = getState(); + final String state = getState(); if (RestAction.STATE_OFFLINE.equals(state)) { + // no further checks needed return new Availability(false, RestAction.STATE_OFFLINE_MSG); } - if (RestAction.STATE_READ_ONLY.equals(state)) { - return new Availability(false, RestAction.STATE_READ_ONLY_MSG); - } // ReadWrite: proceed with live checks CheckResource cr; @@ -220,6 +218,11 @@ public Availability getStatus() { } catch (Exception ex) { throw new CheckException("cadc-tap-tmp check: " + ex, ex); } + + if (RestAction.STATE_READ_ONLY.equals(state)) { + isGood = false; + note = RestAction.STATE_READ_ONLY_MSG; + } } catch (CheckException ce) { // tests determined that the resource is not working