Uh oh!
There was an error while loading. Please reload this page.
JCL-361: Make it easier to modify Access Control resources - #473
Conversation
472eec8 to
c4b993cCompare| final Set<String> supportedTypes; | ||
| if (AccessGrant.class.isAssignableFrom(clazz)) { | ||
| type = ACCESS_GRANT; | ||
| type = URI.create("SolidAccessGrant"); |
There was a problem hiding this comment.
For my own understanding, in this case where the given string isn't a URI, what does the constructor do?
There was a problem hiding this comment.
This is a relative URI. Perfectly valid
| // Access Control Resource | ||
| final IRI subject = asIRI(acl); | ||
| triples.add(rdf.createTriple(subject, a, asIRI(ACP.AccessControlResource))); |
There was a problem hiding this comment.
Is this triple necessary? I assumed this type would be present by default in the ACR.
There was a problem hiding this comment.
In the Inrupt implementation, none of the type triples are strictly necessary. That said, a different impl may require them. Furthermore, the ACR for a resource may be empty, in which case the triple will not already be present.
In short: it never hurts to be explicit, and there may be cases where it is necessary
This introduces a utility function to make it easier to modify Access Control resources to support AccessGrants.
Eventually, this will become part of a stand-alone ACP module, but adding full support for ACP is beyond the scope of the 1.0 release. This, however, allows developers to interact more easily with ACRs within the 1.0 release timeframe.
A sample usage of this would be: