Repository: solid/community-server (ts)

Issue:
`acl:AuthenticatedAgent` vs `foaf:AuthenticatedAgent`
It seems that the WAC spec [refers to](https://github.com/solid/web-access-control-spec#authenticated-agents-anyone-logged-on) `acl:AuthenticatedAgent` but CSS [checks for](https://github.com/solid/community-server/search?q=AuthenticatedAgent) `foaf:AuthenticatedAgent` instead.

NB: Not to be confused with [`acl:agentClass  foaf:Agent`](https://github.com/solid/web-access-control-spec#public-access-all-agents), where WAC does refer to `foaf:` instead of to `acl:`.

Pull request description:
Fix #621: acl:AuthenticatedAgent instead of foaf:AuthenticatedAgent

Patch:
diff --git a/src/authorization/WebAclAuthorizer.ts b/src/authorization/WebAclAuthorizer.ts
index 74f8f0a5c..a5182a533 100644
--- a/src/authorization/WebAclAuthorizer.ts
+++ b/src/authorization/WebAclAuthorizer.ts
@@ -169,7 +169,7 @@ export class WebAclAuthorizer extends Authorizer {
     if (typeof agent.webId !== 'string') {
       return false;
     }
-    if (store.countQuads(auth, ACL.agentClass, FOAF.AuthenticatedAgent, null) > 0) {
+    if (store.countQuads(auth, ACL.agentClass, ACL.AuthenticatedAgent, null) > 0) {
       return true;
     }
     return store.countQuads(auth, ACL.agent, agent.webId, null) > 0;
diff --git a/src/util/Vocabularies.ts b/src/util/Vocabularies.ts
index d8c2d5027..64354650e 100644
--- a/src/util/Vocabularies.ts
+++ b/src/util/Vocabularies.ts
@@ -59,6 +59,7 @@ export const ACL = createUriAndTermNamespace('http://www.w3.org/ns/auth/acl#',
   'accessTo',
   'agent',
   'agentClass',
+  'AuthenticatedAgent',
   'default',
   'mode',
 
@@ -79,7 +80,6 @@ export const DC = createUriAndTermNamespace('http://purl.org/dc/terms/',
 
 export const FOAF = createUriAndTermNamespace('http://xmlns.com/foaf/0.1/',
   'Agent',
-  'AuthenticatedAgent',
 );
 
 export const HTTP = createUriAndTermNamespace('urn:solid:http:',


Test patch:
diff --git a/test/unit/authorization/WebAclAuthorizer.test.ts b/test/unit/authorization/WebAclAuthorizer.test.ts
index e9a599c43..6136f3f44 100644
--- a/test/unit/authorization/WebAclAuthorizer.test.ts
+++ b/test/unit/authorization/WebAclAuthorizer.test.ts
@@ -102,7 +102,7 @@ describe('A WebAclAuthorizer', (): void => {
 
   it('allows access to authorized agents if the acl files allows all authorized users.', async(): Promise<void> => {
     store.getRepresentation = async(): Promise<Representation> => ({ data: guardedStreamFrom([
-      quad(nn('auth'), nn(`${acl}agentClass`), nn('http://xmlns.com/foaf/0.1/AuthenticatedAgent')),
+      quad(nn('auth'), nn(`${acl}agentClass`), nn(`${acl}AuthenticatedAgent`)),
       quad(nn('auth'), nn(`${acl}accessTo`), nn(identifier.path)),
       quad(nn('auth'), nn(`${acl}mode`), nn(`${acl}Read`)),
       quad(nn('auth'), nn(`${acl}mode`), nn(`${acl}Write`)),
@@ -114,7 +114,7 @@ describe('A WebAclAuthorizer', (): void => {
 
   it('errors if authorization is required but the agent is not authorized.', async(): Promise<void> => {
     store.getRepresentation = async(): Promise<Representation> => ({ data: guardedStreamFrom([
-      quad(nn('auth'), nn(`${acl}agentClass`), nn('http://xmlns.com/foaf/0.1/AuthenticatedAgent')),
+      quad(nn('auth'), nn(`${acl}agentClass`), nn(`${acl}AuthenticatedAgent`)),
       quad(nn('auth'), nn(`${acl}accessTo`), nn(identifier.path)),
       quad(nn('auth'), nn(`${acl}mode`), nn(`${acl}Read`)),
       quad(nn('auth'), nn(`${acl}mode`), nn(`${acl}Write`)),