refactor: Make URI constants consistent

This commit is contained in:
Joachim Van Herwegen
2020-09-11 17:25:30 +02:00
parent 8d3979372b
commit 85df2e5d7f
37 changed files with 320 additions and 253 deletions

View File

@@ -1,20 +0,0 @@
const ACL_PREFIX = 'http://www.w3.org/ns/auth/acl#';
const FOAF_PREFIX = 'http://xmlns.com/foaf/0.1/';
export const ACL = {
accessTo: `${ACL_PREFIX}accessTo`,
agent: `${ACL_PREFIX}agent`,
agentClass: `${ACL_PREFIX}agentClass`,
default: `${ACL_PREFIX}default`,
mode: `${ACL_PREFIX}mode`,
Write: `${ACL_PREFIX}Write`,
Read: `${ACL_PREFIX}Read`,
Append: `${ACL_PREFIX}Append`,
Control: `${ACL_PREFIX}Control`,
};
export const FOAF = {
Agent: `${FOAF_PREFIX}Agent`,
AuthenticatedAgent: `${FOAF_PREFIX}AuthenticatedAgent`,
};

View File

@@ -9,7 +9,7 @@ import { INTERNAL_QUADS } from '../util/ContentTypes';
import { ForbiddenHttpError } from '../util/errors/ForbiddenHttpError';
import { NotFoundHttpError } from '../util/errors/NotFoundHttpError';
import { UnauthorizedHttpError } from '../util/errors/UnauthorizedHttpError';
import { ACL, FOAF } from './AclConstants';
import { ACL, FOAF } from '../util/UriConstants';
import { AclManager } from './AclManager';
import { Authorizer, AuthorizerArgs } from './Authorizer';