Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/classes/access-control-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export default class AccessControlList {
* @param {Array<String> | null} agents Array of webId or null if for everyone
*/
createQuadList = (modes: Array<String>, agents: Array<String> | null) => {
const { acl, foaf, a } = ACL_PREFIXES;
const { acl, foaf, rdf } = ACL_PREFIXES;
const subject = `${this.aclUri}#${modes.join('')}`;
const { documentUri } = this;
const originalPredicates = [
this.createQuad(subject, `${a}`, namedNode(`${acl}Authorization`)),
this.createQuad(subject, `${rdf}type`, namedNode(`${acl}Authorization`)),
this.createQuad(subject, `${acl}accessTo`, namedNode(documentUri)),
this.createQuad(subject, `${acl}default`, namedNode(documentUri))
];
Expand Down Expand Up @@ -243,9 +243,9 @@ export default class AccessControlList {
*/
createMode = async ({ modes, agents }) => {
try {
const { acl, foaf, a } = ACL_PREFIXES;
const { acl, foaf } = ACL_PREFIXES;
const subject = `${this.aclUri}#${modes.join('')}`;
await ldflex[subject][a].add(namedNode(`${acl}Authorization`));
await ldflex[subject].type.add(namedNode(`${acl}Authorization`));
const path = namedNode(this.documentUri);
await ldflex[subject]['acl:accessTo'].add(path);
await ldflex[subject]['acl:default'].add(path);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const ACL_PREFIXES = {
acl: 'http://www.w3.org/ns/auth/acl#',
foaf: 'http://xmlns.com/foaf/0.1/',
n: 'http://www.w3.org/2006/vcard/ns#',
a: 'http://www.w3.org/ns/auth/acl#type'
rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
};

export const FORM_MODEL = {
Expand Down