(webId, hostname)
| 429 | // this /.meta has no functionality in actual NSS |
| 430 | // comment https://github.com/solid/node-solid-server/pull/1604#discussion_r652903546 |
| 431 | async isOwner (webId, hostname) { |
| 432 | const rootUrl = this.resourceMapper.resolveUrl(hostname) |
| 433 | let graph |
| 434 | try { |
| 435 | graph = await this.getGraph(rootUrl + '/.meta') |
| 436 | const SOLID = $rdf.Namespace('http://www.w3.org/ns/solid/terms#') |
| 437 | const owner = await graph.statementsMatching($rdf.sym(webId), SOLID('account'), $rdf.sym(rootUrl + '/')) |
| 438 | return owner.length |
| 439 | } catch (error) { |
| 440 | throw new Error(`Failed to get owner from ${rootUrl}/.meta, got ` + error) |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | async get (options, searchIndex = true) { |
| 445 | let pathLocal, contentType, stats |
no test coverage detected