implement VOSI permissions using headers#256
Conversation
cadc-tap_schema: compute and assign "size" when possible
hack: accept literal value of "null" to remove a grant
…l value always get schema and table permissions in get methods
this is to allow a pure http header POST (permissions)
updates to handle null TapPermissions.isPublic correctly
set schema and table permissions using http headers (VOSI) fix some tests that assumed specific permissions
simplify vosi permissions via headers to implement openapi spec
| try { | ||
| return Integer.parseInt(s); | ||
| } catch (NumberFormatException ex) { | ||
| throw new RuntimeException("BUG: failed to convert arraysize '" + arraysize |
There was a problem hiding this comment.
I think it has to be(most probably) a mistake of a user sending for example "foo" or "10*10"... so I think it should be throwing IllegalArgException instead of RuntimeException.
Aside, I am updating the exception handling part to give user informative message so throwing IllegalArgException will help.
There was a problem hiding this comment.
input arraysize is validated by the VOTableReader using VOTableUtil.getArrayShape(String) and that does throw IllegalArgumentException, so here we only need to deal with valid values. I suppose I could explicitly call getArrayShape (again) and look for an int[1] result.
I changed the method to call getArrayShape and it's simpler (a bit funky) and doesn't have any bugs to detect :-)
retain the deprecated
/permissionsendpoint