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')
11
11
const authProxy = require ( './handlers/auth-proxy' )
12
12
const SolidHost = require ( './models/solid-host' )
13
13
const AccountManager = require ( './models/account-manager' )
14
- const AccountTemplate = require ( './models/account-template' )
15
14
const vhost = require ( 'vhost' )
16
15
const EmailService = require ( './services/email-service' )
17
16
const TokenService = require ( './services/token-service' )
@@ -53,8 +52,6 @@ function createApp (argv = {}) {
53
52
defaultContentType : argv . defaultContentType
54
53
} )
55
54
56
- AccountTemplate . registerHostname ( argv . serverUri )
57
-
58
55
const configPath = config . initConfigDir ( argv )
59
56
argv . templates = config . initTemplateDirs ( configPath )
60
57
Original file line number Diff line number Diff line change @@ -35,15 +35,6 @@ class AccountTemplate {
35
35
this . templateFiles = options . templateFiles || TEMPLATE_FILES
36
36
}
37
37
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
-
47
38
/**
48
39
* Factory method, returns an AccountTemplate for a given user account.
49
40
*
@@ -81,17 +72,9 @@ class AccountTemplate {
81
72
* @return {Object }
82
73
*/
83
74
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
- }
92
75
const substitutions = {
93
76
name : userAccount . displayName ,
94
- webId : podRelativeWebId ,
77
+ webId : userAccount . externalWebId ? userAccount . webId : '/profile/card#me' ,
95
78
email : userAccount . email ,
96
79
idp : userAccount . idp
97
80
}
You can’t perform that action at this time.
0 commit comments