aboutsummaryrefslogtreecommitdiff
path: root/ExamTemplate/Web/Views/Account/Profile.cshtml
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-05-08 18:10:08 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-05-08 18:10:08 +0300
commit82d270a66b8ffca28e321f29b2eb90b2412ac9a7 (patch)
treebd7e985592a0d8d5ec31b590b3c52d403e17e140 /ExamTemplate/Web/Views/Account/Profile.cshtml
parenta1e46b76a1299e35b1ac8cae69e77c66d74224a6 (diff)
downloadit-kariera-exam-template-82d270a66b8ffca28e321f29b2eb90b2412ac9a7.tar
it-kariera-exam-template-82d270a66b8ffca28e321f29b2eb90b2412ac9a7.tar.gz
it-kariera-exam-template-82d270a66b8ffca28e321f29b2eb90b2412ac9a7.zip
Implemented authorization; Replaced Role with IdentityRole<Guid>; Renamed UserController to AccountController, updated links
Diffstat (limited to 'ExamTemplate/Web/Views/Account/Profile.cshtml')
-rw-r--r--ExamTemplate/Web/Views/Account/Profile.cshtml27
1 files changed, 27 insertions, 0 deletions
diff --git a/ExamTemplate/Web/Views/Account/Profile.cshtml b/ExamTemplate/Web/Views/Account/Profile.cshtml
new file mode 100644
index 0000000..c6f3e5c
--- /dev/null
+++ b/ExamTemplate/Web/Views/Account/Profile.cshtml
@@ -0,0 +1,27 @@
+@using Microsoft.AspNetCore.Identity
+
+@inject SignInManager<User> SignInManager
+@inject UserManager<User> UserManager
+
+@model UserViewModel
+@{
+ ViewData["Title"] = Model.Username + "'s Profile";
+}
+
+<p>
+ <h2>
+ @Model.FirstName @Model.LastName
+ </h2>
+ <div>
+ @Model.Username
+ </div>
+ @if (SignInManager.IsSignedIn(User))
+ {
+ @if(UserManager.GetUserName(User) == Model.Username)
+ {
+ <form asp-controller="Account" asp-action="Edit" method="get">
+ <input type="submit" value="Edit Profile">
+ </form>
+ }
+ }
+</p>