summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-06-29 08:56:37 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-07-02 14:49:13 +0200
commit1834bd8137ab2f50faf9cf763218dd4f628526f2 (patch)
tree9b6a51bfa114e03b2847674e5dabc9156be57c39
parent059e1bbc305beee7b51c4e259d4244c8e96b2674 (diff)
Do not create an inbox by default: it is useless and tricky
-rw-r--r--src/scm/webid-oidc/server/create.scm69
1 files changed, 2 insertions, 67 deletions
diff --git a/src/scm/webid-oidc/server/create.scm b/src/scm/webid-oidc/server/create.scm
index dc12ff9..f354445 100644
--- a/src/scm/webid-oidc/server/create.scm
+++ b/src/scm/webid-oidc/server/create.scm
@@ -188,8 +188,7 @@
(format #f "@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
-<~a~a> a foaf:Person;
- ldp:inbox </inbox/> .
+<~a~a> a foaf:Person .
"
(if (uri-query owner)
(string-append
@@ -234,68 +233,4 @@
load-content-type load-contained load-static-content
do-create do-delete
#:create-intermediate-containers? #t))
- (lambda error #f))
- ;; Also, we need an inbox: look up the profile to know where to
- ;; put it
- (receive (main-profile-etag rest)
- (read-path (uri-path owner))
- (when (and main-profile-etag
- (eq? (load-content-type main-profile-etag) 'text/turtle))
- (false-if-exception
- (with-index
- (fetch
- (build-uri
- (uri-scheme owner)
- #:userinfo (uri-userinfo owner)
- #:host (uri-host owner)
- #:port (uri-port owner)
- #:path (uri-path owner))
- #:http-get
- (lambda args
- (values
- (build-response #:headers '((content-type text/turtle)))
- (load-static-content main-profile-etag))))
- (lambda (rdf-match)
- (let ((inboxes
- (map rdf-triple-object
- (rdf-match
- (string->uri owner)
- "http://www.w3.org/ns/ldp#inbox"
- #f))))
- (for-each
- (lambda (inbox-path)
- (catch 'already-exists
- (lambda ()
- (update-path
- inbox-path
- (lambda (etag auxiliary)
- (when etag
- (throw 'already-exists))
- (values
- (do-create 'text/turtle '() "")
- (list
- (cons (string->uri "http://www.w3.org/ns/auth/acl#accessControl")
- (do-create 'text/turtle #f
- (format #f "@prefix acl: <http://www.w3.org/ns/auth/acl#> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-
-<#public>
- a acl:Authorization;
- acl:accessTo <~a>;
- acl:agentClass foaf:Agent;
- acl:mode acl:Read.
-
-<#default>
- a acl:Authorization;
- acl:accessTo <~a>;
- acl:agent <~a>;
- acl:mode acl:Read, acl:Write, acl:Control.
-"
- (fix-angle inbox-path)
- (fix-angle inbox-path)
- (fix-angle (uri->string owner))))))))
- load-content-type load-contained load-static-content
- do-create do-delete
- #:create-intermediate-containers? #t))
- (lambda error #f)))
- inboxes)))))))))))
+ (lambda error #f))))))