From f7b367ad37010507152843f4c9f9f1e86007d76a Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Tue, 1 Dec 2020 21:48:05 +0800 Subject: [PATCH] update Former-commit-id: eab3a7ea4b6faa523776913f8ed37acc0c52a464 Former-commit-id: 3fc3012e698286f6a7a870ee67b99d5e7e91e863 --- .../Areas/Admin/Controllers/SiteController.cs | 18 +++++++++++++ .../Areas/Admin/Views/Shared/_Menu.cshtml | 4 +++ .../IoTCenter/Views/Account/Security.cshtml | 26 +------------------ projects/IoTCenter/Views/Account/_Menu.cshtml | 12 --------- 4 files changed, 23 insertions(+), 37 deletions(-) create mode 100644 projects/IoTCenter/Areas/Admin/Controllers/SiteController.cs diff --git a/projects/IoTCenter/Areas/Admin/Controllers/SiteController.cs b/projects/IoTCenter/Areas/Admin/Controllers/SiteController.cs new file mode 100644 index 00000000..a4db378b --- /dev/null +++ b/projects/IoTCenter/Areas/Admin/Controllers/SiteController.cs @@ -0,0 +1,18 @@ +using Application.Domain.Entities; +using Application.Models; +using Infrastructure.Data; +using Infrastructure.Web.Mvc; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace IoTCenter.Areas.Admin.Controllers +{ + [Authorize] + [Area(nameof(Admin))] + public class SiteController : CrudController + { + public SiteController(IRepository siteRepo) : base(siteRepo) + { + } + } +} \ No newline at end of file diff --git a/projects/IoTCenter/Areas/Admin/Views/Shared/_Menu.cshtml b/projects/IoTCenter/Areas/Admin/Views/Shared/_Menu.cshtml index 6b8449dc..7d164ce7 100644 --- a/projects/IoTCenter/Areas/Admin/Views/Shared/_Menu.cshtml +++ b/projects/IoTCenter/Areas/Admin/Views/Shared/_Menu.cshtml @@ -4,6 +4,10 @@ { } + @if (HasPermission("Read-Site")) + { + + } @if (HasPermission("Read-User","Read-Role","Read-Permission")) { - - \ No newline at end of file