From 1834bd8137ab2f50faf9cf763218dd4f628526f2 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Tue, 29 Jun 2021 08:56:37 +0200 Subject: Do not create an inbox by default: it is useless and tricky --- src/scm/webid-oidc/server/create.scm | 69 ++---------------------------------- 1 file 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: . @prefix ldp: . -<~a~a> a foaf:Person; - ldp: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: . -@prefix foaf: . - -<#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)))))) -- cgit v1.2.3