Browse Source

Changed most 'user' subdomains to 'account'.

tags/3.0.0^2
Teknikode 9 months ago
parent
commit
0df52f5d79

+ 2
- 2
Teknik/Areas/About/Views/About/Index.cshtml View File

@@ -26,8 +26,8 @@
<!-- Heading -->
<tr>
<th class="text-center"></th>
<th class="text-center"><a href="@Url.SubRouteUrl("user", "User.GetPremium")">Premium Account</a></th>
<th class="text-center"><a href="@Url.SubRouteUrl("user", "User.Register")">Basic Account</a></th>
<th class="text-center"><a href="@Url.SubRouteUrl("account", "User.GetPremium")">Premium Account</a></th>
<th class="text-center"><a href="@Url.SubRouteUrl("account", "User.Register")">Basic Account</a></th>
<th class="text-center">No Account</th>
</tr>
<!-- Prices -->

+ 2
- 2
Teknik/Areas/FAQ/Views/FAQ/Index.cshtml View File

@@ -92,7 +92,7 @@
</div>
<div id="collapse101" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
To sign up for an account, you just need to click the <strong>Sign Up</strong> button on the top right of the navigation panel, or visit the <a href="@Url.SubRouteUrl("user", "User.Register")">Registration Page</a>.
To sign up for an account, you just need to click the <strong>Sign Up</strong> button on the top right of the navigation panel, or visit the <a href="@Url.SubRouteUrl("account", "User.Register")">Registration Page</a>.
</div>
</div>
</div>
@@ -104,7 +104,7 @@
</div>
<div id="collapse102" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
To purchase a premium account, you can navigate to the <a href="@Url.SubRouteUrl("user", "User.GetPremium")">premium account</a> page and choose the method of payment and follow the instructions provided.
To purchase a premium account, you can navigate to the <a href="@Url.SubRouteUrl("account", "User.GetPremium")">premium account</a> page and choose the method of payment and follow the instructions provided.
</div>
</div>
</div>

+ 1
- 1
Teknik/Areas/Home/Views/Home/Index.cshtml View File

@@ -78,7 +78,7 @@
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading text-center">
<h2><a href="@Url.SubRouteUrl("user", "User.Register")">Sign Up</a> for free and get access to these features and more!</h2>
<h2><a href="@Url.SubRouteUrl("account", "User.Register")">Sign Up</a> for free and get access to these features and more!</h2>
</div>
<br />
<div class="panel-body">

+ 10
- 10
Teknik/Areas/User/Controllers/UserController.cs View File

@@ -165,7 +165,7 @@ namespace Teknik.Areas.Users.Controllers
}
if (!model.Error)
{
return Redirect(Url.SubRouteUrl("user", "User.Login", new { returnUrl = model.ReturnUrl }));
return Redirect(Url.SubRouteUrl("account", "User.Login", new { returnUrl = model.ReturnUrl }));
}
}
}
@@ -282,7 +282,7 @@ namespace Teknik.Areas.Users.Controllers

public IActionResult Settings()
{
return Redirect(Url.SubRouteUrl("user", "User.ProfileSettings"));
return Redirect(Url.SubRouteUrl("account", "User.ProfileSettings"));
}
public IActionResult ProfileSettings()
@@ -617,8 +617,8 @@ namespace Teknik.Areas.Users.Controllers
// If they have a recovery email, let's send a verification
if (!string.IsNullOrEmpty(settings.RecoveryEmail))
{
string resetUrl = Url.SubRouteUrl("user", "User.ResetPassword", new { Username = user.Username });
string verifyUrl = Url.SubRouteUrl("user", "User.VerifyRecoveryEmail", new { Username = user.Username, Code = WebUtility.UrlEncode(token) });
string resetUrl = Url.SubRouteUrl("account", "User.ResetPassword", new { Username = user.Username });
string verifyUrl = Url.SubRouteUrl("account", "User.VerifyRecoveryEmail", new { Username = user.Username, Code = WebUtility.UrlEncode(token) });
UserHelper.SendRecoveryEmailVerification(_config, user.Username, settings.RecoveryEmail, resetUrl, verifyUrl);
}
}
@@ -635,7 +635,7 @@ namespace Teknik.Areas.Users.Controllers

//if (!oldTwoFactor && settings.TwoFactorEnabled)
//{
// return Json(new { result = new { checkAuth = true, key = newKey, qrUrl = Url.SubRouteUrl("user", "User.Action", new { action = "GenerateAuthQrCode", key = newKey }) } });
// return Json(new { result = new { checkAuth = true, key = newKey, qrUrl = Url.SubRouteUrl("account", "User.Action", new { action = "GenerateAuthQrCode", key = newKey }) } });
//}
return Json(new { result = true });
}
@@ -785,8 +785,8 @@ namespace Teknik.Areas.Users.Controllers
if (!userInfo.RecoveryVerified.HasValue || !userInfo.RecoveryVerified.Value)
{
var token = await IdentityHelper.UpdateRecoveryEmail(_config, user.Username, userInfo.RecoveryEmail);
string resetUrl = Url.SubRouteUrl("user", "User.ResetPassword", new { Username = user.Username });
string verifyUrl = Url.SubRouteUrl("user", "User.VerifyRecoveryEmail", new { Username = user.Username, Code = WebUtility.UrlEncode(token) });
string resetUrl = Url.SubRouteUrl("account", "User.ResetPassword", new { Username = user.Username });
string verifyUrl = Url.SubRouteUrl("account", "User.VerifyRecoveryEmail", new { Username = user.Username, Code = WebUtility.UrlEncode(token) });
UserHelper.SendRecoveryEmailVerification(_config, user.Username, userInfo.RecoveryEmail, resetUrl, verifyUrl);
return Json(new { result = true });
}
@@ -829,7 +829,7 @@ namespace Teknik.Areas.Users.Controllers
if (!string.IsNullOrEmpty(userClaims.RecoveryEmail) && userClaims.RecoveryVerified.HasValue && userClaims.RecoveryVerified.Value)
{
string verifyCode = await IdentityHelper.GeneratePasswordResetToken(_config, User.Identity.Name);
string resetUrl = Url.SubRouteUrl("user", "User.VerifyResetPassword", new { Username = user.Username, Code = WebUtility.UrlEncode(verifyCode) });
string resetUrl = Url.SubRouteUrl("account", "User.VerifyResetPassword", new { Username = user.Username, Code = WebUtility.UrlEncode(verifyCode) });
UserHelper.SendResetPasswordVerification(_config, user.Username, userClaims.RecoveryEmail, resetUrl);
return Json(new { result = true });
}
@@ -937,7 +937,7 @@ namespace Teknik.Areas.Users.Controllers

if (!string.IsNullOrEmpty(key))
{
return Json(new { result = true, key = key, qrUrl = Url.SubRouteUrl("user", "User.Action", new { action = "GenerateAuthQrCode", key = key }) });
return Json(new { result = true, key = key, qrUrl = Url.SubRouteUrl("account", "User.Action", new { action = "GenerateAuthQrCode", key = key }) });
}
return Json(new { error = "Unable to generate Two Factor Authentication key" });
}
@@ -1331,7 +1331,7 @@ namespace Teknik.Areas.Users.Controllers
{
if (code.Owner.Username == User.Identity.Name)
{
return Json(new { result = Url.SubRouteUrl("user", "User.Register", new { inviteCode = code.Code }) });
return Json(new { result = Url.SubRouteUrl("account", "User.Register", new { inviteCode = code.Code }) });
}
}
return Json(new { error = "Invite Code not associated with this user" });

+ 2
- 2
Teknik/Areas/User/Utility/UserHelper.cs View File

@@ -155,8 +155,8 @@ namespace Teknik.Areas.Users.Utility
if (!string.IsNullOrEmpty(recoveryEmail))
{
var token = await IdentityHelper.UpdateRecoveryEmail(config, username, recoveryEmail);
string resetUrl = url.SubRouteUrl("user", "User.ResetPassword", new { Username = username });
string verifyUrl = url.SubRouteUrl("user", "User.VerifyRecoveryEmail", new { Code = WebUtility.UrlEncode(token) });
string resetUrl = url.SubRouteUrl("account", "User.ResetPassword", new { Username = username });
string verifyUrl = url.SubRouteUrl("account", "User.VerifyRecoveryEmail", new { Code = WebUtility.UrlEncode(token) });
SendRecoveryEmailVerification(config, username, recoveryEmail, resetUrl, verifyUrl);
}
return;

+ 1
- 1
Teknik/Areas/User/Views/User/Register.cshtml View File

@@ -12,7 +12,7 @@
</div>
</div>
</div>
<!form id="registrationForm" action="@Url.SubRouteUrl("user", "User.Register")" method="post" accept-charset="UTF-8">
<!form id="registrationForm" action="@Url.SubRouteUrl("account", "User.Register")" method="post" accept-charset="UTF-8">
<input name="Register.ReturnUrl" id="registerReturnUrl" type="hidden" value="@Model.ReturnUrl" />
<div class="form-group">
<label for="registerUsername">Username <span class="text-danger">*</span></label>

+ 1
- 1
Teknik/Areas/User/Views/User/ResetPassword.cshtml View File

@@ -8,7 +8,7 @@
{
<h1>Reset Password</h1>
<div class="col-md-4 col-md-offset-4">
<!form role="form" id="reset_pass_send" action="@Url.SubRouteUrl("user", "User.Action", new { action = "SendResetPasswordVerification" })" method="post" accept-charset="UTF-8">
<!form role="form" id="reset_pass_send" action="@Url.SubRouteUrl("account", "User.Action", new { action = "SendResetPasswordVerification" })" method="post" accept-charset="UTF-8">
<div class="form-group">
<input type="text" class="form-control" id="reset_username" value="@Model.Username" placeholder="Username" name="reset_username" />
<span id="helpBlock" class="help-block">Send a temporary link to your recovery email to reset your password.</span>

+ 1
- 1
Teknik/Areas/User/Views/User/ResetPasswordVerification.cshtml View File

@@ -10,7 +10,7 @@
<div class="col-md-4 col-md-offset-4">
@if (Model.Success)
{
<!form role="form" id="setNewPass" action="@Url.SubRouteUrl("user", "User.Action", new { action = "SetUserPassword" })" method="post" accept-charset="UTF-8">
<!form role="form" id="setNewPass" action="@Url.SubRouteUrl("account", "User.Action", new { action = "SetUserPassword" })" method="post" accept-charset="UTF-8">
<div class="form-group">
<input type="password" class="form-control" id="setNewPass_Password" value="" placeholder="Password" name="setNewPass_Password" data-val-required="The Password field is required." data-val="true" />
</div>

+ 4
- 4
Teknik/Areas/User/Views/User/Settings/AccountSettings.cshtml View File

@@ -8,8 +8,8 @@

<script>
var homeUrl = '@Url.SubRouteUrl("www", "Home.Index")';
var deleteUserURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "Delete" })';
var changePasswordUrl = '@Url.SubRouteUrl("user", "User.Action", new { action = "ChangePassword" })';
var deleteUserURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "Delete" })';
var changePasswordUrl = '@Url.SubRouteUrl("account", "User.Action", new { action = "ChangePassword" })';
</script>

<div class="row">
@@ -43,12 +43,12 @@
</div>
<div class="row">
<div class="form-group col-sm-10">
<button class="btn btn-default" id="change_password_submit" type="button">Change Password</button> <a href="@Url.SubRouteUrl("user", "User.ResetPassword", new { Username = User.Identity.Name })">I forgot my password</a>
<button class="btn btn-default" id="change_password_submit" type="button">Change Password</button> <a href="@Url.SubRouteUrl("account", "User.ResetPassword", new { Username = User.Identity.Name })">I forgot my password</a>
</div>
</div>
<div class="row">
<div class="form-group col-sm-10">
<p><small>Want to manage your two-factor authentication? Check out your <a href="@Url.SubRouteUrl("user", "User.SecuritySettings")">Security</a> settings.</small></p>
<p><small>Want to manage your two-factor authentication? Check out your <a href="@Url.SubRouteUrl("account", "User.SecuritySettings")">Security</a> settings.</small></p>
</div>
</div>
</!form>

+ 1
- 1
Teknik/Areas/User/Views/User/Settings/BlogSettings.cshtml View File

@@ -7,7 +7,7 @@
}

<script>
var editURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "EditBlog" })';
var editURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "EditBlog" })';
</script>



+ 4
- 4
Teknik/Areas/User/Views/User/Settings/DeveloperSettings.cshtml View File

@@ -7,10 +7,10 @@
}

<script>
var createClientURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "CreateClient" })';
var editClientURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "EditClient" })';
var deleteClientURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "DeleteClient" })';
var getClientURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "GetClient" })';
var createClientURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "CreateClient" })';
var editClientURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "EditClient" })';
var deleteClientURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "DeleteClient" })';
var getClientURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "GetClient" })';
</script>

<div class="row">

+ 1
- 1
Teknik/Areas/User/Views/User/Settings/InviteSettings.cshtml View File

@@ -7,7 +7,7 @@
}

<script>
var createExternalLinkURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "CreateInviteCodeLink" })';
var createExternalLinkURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "CreateInviteCodeLink" })';
</script>

<div class="row">

+ 1
- 1
Teknik/Areas/User/Views/User/Settings/ProfileSettings.cshtml View File

@@ -7,7 +7,7 @@
}

<script>
var editURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "EditProfile" })';
var editURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "EditProfile" })';
</script>

<!form class="form" action="##" method="post" id="updateForm">

+ 6
- 6
Teknik/Areas/User/Views/User/Settings/SecuritySettings.cshtml View File

@@ -7,12 +7,12 @@
}

<script>
var editURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "EditSecurity" })';
var resendVerifyURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "ResendVerifyRecoveryEmail"})';
var generate2FAURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "Generate2FA" })';
var confirmAuthSetupURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "VerifyAuthenticatorCode" })';
var resetRecoveryCodesURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "ResetRecoveryCodes" })';
var disable2FAURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "Disable2FA" })';
var editURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "EditSecurity" })';
var resendVerifyURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "ResendVerifyRecoveryEmail"})';
var generate2FAURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "Generate2FA" })';
var confirmAuthSetupURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "VerifyAuthenticatorCode" })';
var resetRecoveryCodesURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "ResetRecoveryCodes" })';
var disable2FAURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "Disable2FA" })';
</script>

<div class="modal fade" id="authenticatorSetup" tabindex="-1" role="dialog" aria-labelledby="authenticatorSetupLabel" aria-hidden="true">

+ 7
- 7
Teknik/Areas/User/Views/User/Settings/Settings.cshtml View File

@@ -15,17 +15,17 @@
<div class="panel panel-default">
<ul class="list-group">
<div class="panel-heading text-center"><strong>Personal Settings</strong></div>
<a href="@Url.SubRouteUrl("user", "User.ProfileSettings")" class="list-group-item @(Model.Page == "Profile" ? "active" : string.Empty)">Profile</a>
<a href="@Url.SubRouteUrl("user", "User.AccountSettings")" class="list-group-item @(Model.Page == "Account" ? "active" : string.Empty)">Account</a>
<a href="@Url.SubRouteUrl("user", "User.SecuritySettings")" class="list-group-item @(Model.Page == "Security" ? "active" : string.Empty)">Security</a>
<a href="@Url.SubRouteUrl("user", "User.InviteSettings")" class="list-group-item @(Model.Page == "Invite" ? "active" : string.Empty)">Invite Codes</a>
<a href="@Url.SubRouteUrl("user", "User.BlogSettings")" class="list-group-item @(Model.Page == "Blog" ? "active" : string.Empty)">Blogging</a>
<a href="@Url.SubRouteUrl("user", "User.UploadSettings")" class="list-group-item @(Model.Page == "Upload" ? "active" : string.Empty)">Uploads</a>
<a href="@Url.SubRouteUrl("account", "User.ProfileSettings")" class="list-group-item @(Model.Page == "Profile" ? "active" : string.Empty)">Profile</a>
<a href="@Url.SubRouteUrl("account", "User.AccountSettings")" class="list-group-item @(Model.Page == "Account" ? "active" : string.Empty)">Account</a>
<a href="@Url.SubRouteUrl("account", "User.SecuritySettings")" class="list-group-item @(Model.Page == "Security" ? "active" : string.Empty)">Security</a>
<a href="@Url.SubRouteUrl("account", "User.InviteSettings")" class="list-group-item @(Model.Page == "Invite" ? "active" : string.Empty)">Invite Codes</a>
<a href="@Url.SubRouteUrl("account", "User.BlogSettings")" class="list-group-item @(Model.Page == "Blog" ? "active" : string.Empty)">Blogging</a>
<a href="@Url.SubRouteUrl("account", "User.UploadSettings")" class="list-group-item @(Model.Page == "Upload" ? "active" : string.Empty)">Uploads</a>
</ul>
</div>
<div class="panel panel-default">
<ul class="list-group">
<a href="@Url.SubRouteUrl("user", "User.DeveloperSettings")" class="list-group-item @(Model.Page == "Developer" ? "active" : string.Empty)">Developer Settings</a>
<a href="@Url.SubRouteUrl("account", "User.DeveloperSettings")" class="list-group-item @(Model.Page == "Developer" ? "active" : string.Empty)">Developer Settings</a>
</ul>
</div>
</div><!--/col-2-->

+ 1
- 1
Teknik/Areas/User/Views/User/Settings/UploadSettings.cshtml View File

@@ -7,7 +7,7 @@
}

<script>
var editURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "EditUpload" })';
var editURL = '@Url.SubRouteUrl("account", "User.Action", new { action = "EditUpload" })';
</script>

<bundle src="css/user.settings.upload.min.css" append-version="true"></bundle>

+ 1
- 1
Teknik/Areas/User/Views/User/ViewProfile.cshtml View File

@@ -61,7 +61,7 @@
Raw:
</div>
<div class="col-sm-10 text-right">
<a href="@Url.SubRouteUrl("user", "User.PGPKey", new { username = Model.Username })" target="_blank">@Url.SubRouteUrl("user", "User.PGPKey", new { username = Model.Username })</a>
<a href="@Url.SubRouteUrl("account", "User.PGPKey", new { username = Model.Username })" target="_blank">@Url.SubRouteUrl("account", "User.PGPKey", new { username = Model.Username })</a>
</div>
</div>
<br />

+ 5
- 5
Teknik/Areas/User/Views/User/_LoginPartial.cshtml View File

@@ -15,10 +15,10 @@
<a href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = User.Identity.Name })"><i class="fa fa-book fa-fw"></i>&nbsp;&nbsp;View Blog</a>
</li>
<li is-active-route asp-controller="User" asp-action="ViewServiceData">
<a href="@Url.SubRouteUrl("user", "User.ViewServiceData")"><i class="fa fa-database fa-fw"></i>&nbsp;&nbsp;Service Data</a>
<a href="@Url.SubRouteUrl("account", "User.ViewServiceData")"><i class="fa fa-database fa-fw"></i>&nbsp;&nbsp;Service Data</a>
</li>
<li is-active-route asp-controller="User" asp-action="Settings">
<a href="@Url.SubRouteUrl("user", "User.Settings")"><i class="fa fa-sliders fa-fw"></i>&nbsp;&nbsp;Settings</a>
<a href="@Url.SubRouteUrl("account", "User.Settings")"><i class="fa fa-sliders fa-fw"></i>&nbsp;&nbsp;Settings</a>
</li>
@if (User.IsInRole("Admin"))
{
@@ -29,7 +29,7 @@
}
<li role="separator" class="divider"></li>
<li>
<a href="@Url.SubRouteUrl("user", "User.Logout")"><i class="fa fa-sign-out fa-fw"></i>&nbsp;&nbsp;Log Out</a>
<a href="@Url.SubRouteUrl("account", "User.Logout")"><i class="fa fa-sign-out fa-fw"></i>&nbsp;&nbsp;Log Out</a>
</li>
</ul>
</li>
@@ -40,13 +40,13 @@
{
<button id="registerButton" data-toggle="modal" data-target="#registerModal" class="btn btn-default navbar-btn hide">Register</button>
<noscript>
<a href="@Url.SubRouteUrl("user", "User.Register")" class="btn btn-default navbar-btn">Register</a>
<a href="@Url.SubRouteUrl("account", "User.Register")" class="btn btn-default navbar-btn">Register</a>
</noscript>
}
if (Config.UserConfig.LoginEnabled)
{
@*<button id="loginButton" data-toggle="modal" data-target="#loginModal" class="btn btn-default navbar-btn hide">Log In</button>*@
<a href="@Url.SubRouteUrl("user", "User.Login", new { returnUrl = @Context.Request.GetDisplayUrl() })" class="btn btn-default navbar-btn">Log In</a>
<a href="@Url.SubRouteUrl("account", "User.Login", new { returnUrl = @Context.Request.GetDisplayUrl() })" class="btn btn-default navbar-btn">Log In</a>
}
}
</div>

+ 26
- 25
Teknik/Routes.cs View File

@@ -634,136 +634,137 @@ namespace Teknik
routes.MapSubdomainRoute(
name: "User.GetPremium",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "GetPremium",
defaults: new { area = "User", controller = "User", action = "GetPremium" }
);
routes.MapSubdomainRoute(
name: "User.Register",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Register",
defaults: new { area = "User", controller = "User", action = "Register" }
);
routes.MapSubdomainRoute(
name: "User.Login",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Login",
defaults: new { area = "User", controller = "User", action = "Login" }
);
routes.MapSubdomainRoute(
name: "User.Logout",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Logout",
defaults: new { area = "User", controller = "User", action = "Logout" }
);
routes.MapSubdomainRoute(
name: "User.Settings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings",
defaults: new { area = "User", controller = "User", action = "Settings" }
);
routes.MapSubdomainRoute(
name: "User.AccountSettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Account",
defaults: new { area = "User", controller = "User", action = "AccountSettings" }
);
routes.MapSubdomainRoute(
name: "User.SecuritySettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Security",
defaults: new { area = "User", controller = "User", action = "SecuritySettings" }
);
routes.MapSubdomainRoute(
name: "User.ProfileSettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Profile",
defaults: new { area = "User", controller = "User", action = "ProfileSettings" }
);
routes.MapSubdomainRoute(
name: "User.DeveloperSettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Developer",
defaults: new { area = "User", controller = "User", action = "DeveloperSettings" }
);
routes.MapSubdomainRoute(
name: "User.InviteSettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Invites",
defaults: new { area = "User", controller = "User", action = "InviteSettings" }
);
routes.MapSubdomainRoute(
name: "User.BlogSettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Blog",
defaults: new { area = "User", controller = "User", action = "BlogSettings" }
);
routes.MapSubdomainRoute(
name: "User.UploadSettings",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "Settings/Uploads",
defaults: new { area = "User", controller = "User", action = "UploadSettings" }
);
routes.MapSubdomainRoute(
name: "User.ResetPassword",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "ResetPassword/{username?}",
defaults: new { area = "User", controller = "User", action = "ResetPassword" }
);
routes.MapSubdomainRoute(
name: "User.VerifyResetPassword",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "SetPassword/{username}",
defaults: new { area = "User", controller = "User", action = "VerifyResetPassword" }
);
routes.MapSubdomainRoute(
name: "User.VerifyRecoveryEmail",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "VerifyEmail/{username}",
defaults: new { area = "User", controller = "User", action = "VerifyRecoveryEmail" }
);
routes.MapSubdomainRoute(
name: "User.ViewServiceData",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
subDomains: new List<string>() { "account" },
template: "ServiceData",
defaults: new { area = "User", controller = "User", action = "ViewServiceData" }
);
routes.MapSubdomainRoute(
name: "User.Action",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "account" },
template: "Action/{action}",
defaults: new { area = "User", controller = "User", action = "Index" }
);

routes.MapSubdomainRoute(
name: "User.ViewProfile",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
template: "u/{username?}",
template: "{username?}",
defaults: new { area = "User", controller = "User", action = "ViewProfile" }
);
routes.MapSubdomainRoute(
name: "User.PGPKey",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
template: "u/{username}/PGP",
template: "{username}/PGP",
defaults: new { area = "User", controller = "User", action = "ViewRawPGP" }
);
routes.MapSubdomainRoute(
name: "User.Action",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "user" },
template: "Action/{action}",
defaults: new { area = "User", controller = "User", action = "Index" }
);
}

public static void BuildVaultRoutes(this IRouteBuilder routes, Config config)

Loading…
Cancel
Save