File tree Expand file tree Collapse file tree 2 files changed +1
-21
lines changed
Expand file tree Collapse file tree 2 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ const corsProxy = require('./handlers/cors-proxy')
1111const authProxy = require ( './handlers/auth-proxy' )
1212const SolidHost = require ( './models/solid-host' )
1313const AccountManager = require ( './models/account-manager' )
14- const AccountTemplate = require ( './models/account-template' )
1514const vhost = require ( 'vhost' )
1615const EmailService = require ( './services/email-service' )
1716const TokenService = require ( './services/token-service' )
@@ -53,8 +52,6 @@ function createApp (argv = {}) {
5352 defaultContentType : argv . defaultContentType
5453 } )
5554
56- AccountTemplate . registerHostname ( argv . serverUri )
57-
5855 const configPath = config . initConfigDir ( argv )
5956 argv . templates = config . initTemplateDirs ( configPath )
6057
Original file line number Diff line number Diff line change @@ -35,15 +35,6 @@ class AccountTemplate {
3535 this . templateFiles = options . templateFiles || TEMPLATE_FILES
3636 }
3737
38- /**
39- * Registers the server hostname at compile time to check for webID stuff.
40- * @param {string } hostname
41- * @throws if hostname already registered
42- */
43- static registerHostname ( hostname ) {
44- this . hostname = hostname
45- }
46-
4738 /**
4839 * Factory method, returns an AccountTemplate for a given user account.
4940 *
@@ -81,17 +72,9 @@ class AccountTemplate {
8172 * @return {Object }
8273 */
8374 static templateSubstitutionsFor ( userAccount ) {
84- let podRelativeWebId
85- // this means the user's webId and server Uri are the same
86- // therefore, we use a relative uri ref
87- if ( userAccount . webId . indexOf ( this . hostname ) > - 1 ) {
88- podRelativeWebId = path . join ( '/' , userAccount . webId . substring ( userAccount . webId . indexOf ( this . hostname ) + this . hostname . length ) )
89- } else {
90- podRelativeWebId = userAccount . webId
91- }
9275 const substitutions = {
9376 name : userAccount . displayName ,
94- webId : podRelativeWebId ,
77+ webId : userAccount . externalWebId ? userAccount . webId : '/profile/card#me' ,
9578 email : userAccount . email ,
9679 idp : userAccount . idp
9780 }
You can’t perform that action at this time.
0 commit comments