diff --git a/Polyclinic/PolyclinicWebAppImplementer/Controllers/UserController.cs b/Polyclinic/PolyclinicWebAppImplementer/Controllers/UserController.cs index 3748432..2e5021a 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/Controllers/UserController.cs +++ b/Polyclinic/PolyclinicWebAppImplementer/Controllers/UserController.cs @@ -94,5 +94,16 @@ namespace PolyclinicWebAppImplementer.Controllers LoginManager.LogginedUser = null; return RedirectToAction("Login"); } + + [HttpGet] + [HttpPost] + public IActionResult Privacy() + { + if (LoginManager.LogginedUser == null) + { + return RedirectToAction("Login"); + } + return View(); + } } } diff --git a/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs b/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs index 70b305a..4d1e0b3 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs +++ b/Polyclinic/PolyclinicWebAppImplementer/SiteMenuItems.cs @@ -8,7 +8,7 @@ public static (string Controller, string Action, string Title, PageVisible Visible) Symptomes = ("Symptomes", "", "Симптомы", PageVisible.AllowOnlyAuthorized); public static (string Controller, string Action, string Title, PageVisible Visible) Login = ("User", "Login", "Вход", PageVisible.AllowOnlyNotAuthorized); public static (string Controller, string Action, string Title, PageVisible Visible) Register = ("User", "Register", "Регистрация", PageVisible.AllowOnlyNotAuthorized); - public static (string Controller, string Action, string Title, PageVisible Visible) Privacy = ("Home", "Privacy", "Политика приватности", PageVisible.AllowAnyBody); + public static (string Controller, string Action, string Title, PageVisible Visible) Privacy = ("User", "Privacy", "Личный кабинет", PageVisible.AllowOnlyAuthorized); public static (string Controller, string Action, string Title, PageVisible Visible) AddRecipeToCourse = ("Home", "AddRecipeToCourse", "Привязка рецепта", PageVisible.AllowOnlyAuthorized); public static (string Controller, string Action, string Title, PageVisible Visible) MedicamentsByDiagnoses = ("Home", "MedicamentsByDiagnoses", "Лекарства по болезням", PageVisible.AllowOnlyAuthorized); public static (string Controller, string Action, string Title, PageVisible Visible) DiagnosesReport = ("Home", "DiagnosesReport", "Отчет по болезням", PageVisible.AllowOnlyAuthorized); diff --git a/Polyclinic/PolyclinicWebAppImplementer/Views/Home/Privacy.cshtml b/Polyclinic/PolyclinicWebAppImplementer/Views/Home/Privacy.cshtml deleted file mode 100644 index ce65fcc..0000000 --- a/Polyclinic/PolyclinicWebAppImplementer/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewBag.SelectedSiteMenuItem = SiteMenuItems.Privacy; -} -

Политика приватности

- -

Здесь нет никакой приватности

diff --git a/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml b/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml index 3550179..70f67e7 100644 --- a/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml +++ b/Polyclinic/PolyclinicWebAppImplementer/Views/Shared/_Layout.cshtml @@ -71,8 +71,7 @@ diff --git a/Polyclinic/PolyclinicWebAppImplementer/Views/User/Privacy.cshtml b/Polyclinic/PolyclinicWebAppImplementer/Views/User/Privacy.cshtml new file mode 100644 index 0000000..5eb56c8 --- /dev/null +++ b/Polyclinic/PolyclinicWebAppImplementer/Views/User/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewBag.SelectedSiteMenuItem = SiteMenuItems.Privacy; +} +

Личный кабинет

+ +

Здесь будут данные пользователя