From 60fc273ea5364e59361aa1542839bc09c3bb3bc3 Mon Sep 17 00:00:00 2001 From: Ruben Verborgh Date: Tue, 7 Sep 2021 11:33:39 +0200 Subject: [PATCH] change: Rename resourceStore to aclStore. --- config/ldp/authorization/authorizers/acl.json | 2 +- src/authorization/WebAclAuthorizer.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/ldp/authorization/authorizers/acl.json b/config/ldp/authorization/authorizers/acl.json index 36d88f73e..708625669 100644 --- a/config/ldp/authorization/authorizers/acl.json +++ b/config/ldp/authorization/authorizers/acl.json @@ -12,7 +12,7 @@ "aclStrategy": { "@id": "urn:solid-server:default:AclStrategy" }, - "resourceStore": { + "aclStore": { "@id": "urn:solid-server:default:ResourceStore" }, "identifierStrategy": { diff --git a/src/authorization/WebAclAuthorizer.ts b/src/authorization/WebAclAuthorizer.ts index 27cc935d8..747decd45 100644 --- a/src/authorization/WebAclAuthorizer.ts +++ b/src/authorization/WebAclAuthorizer.ts @@ -37,15 +37,15 @@ export class WebAclAuthorizer extends Authorizer { protected readonly logger = getLoggerFor(this); private readonly aclStrategy: AuxiliaryIdentifierStrategy; - private readonly resourceStore: ResourceStore; + private readonly aclStore: ResourceStore; private readonly identifierStrategy: IdentifierStrategy; private readonly accessChecker: AccessChecker; - public constructor(aclStrategy: AuxiliaryIdentifierStrategy, resourceStore: ResourceStore, + public constructor(aclStrategy: AuxiliaryIdentifierStrategy, aclStore: ResourceStore, identifierStrategy: IdentifierStrategy, accessChecker: AccessChecker) { super(); this.aclStrategy = aclStrategy; - this.resourceStore = resourceStore; + this.aclStore = aclStore; this.identifierStrategy = identifierStrategy; this.accessChecker = accessChecker; } @@ -172,7 +172,7 @@ export class WebAclAuthorizer extends Authorizer { try { const acl = this.aclStrategy.getAuxiliaryIdentifier(id); this.logger.debug(`Trying to read the ACL document ${acl.path}`); - const data = await this.resourceStore.getRepresentation(acl, { type: { [INTERNAL_QUADS]: 1 }}); + const data = await this.aclStore.getRepresentation(acl, { type: { [INTERNAL_QUADS]: 1 }}); this.logger.info(`Reading ACL statements from ${acl.path}`); return await this.filterData(data, recurse ? ACL.default : ACL.accessTo, id.path);