增加view里面判断权限的方法

This commit is contained in:
2018-08-23 22:34:24 +08:00
parent d2b0ea14a1
commit e6245d3a37
4 changed files with 5 additions and 5 deletions
@@ -2,7 +2,7 @@
@{ @{
ViewBag.title = "添加管理员"; ViewBag.title = "添加管理员";
} }
<div class="wrapper wrapper-content animated fadeInRight"> <div class="wrapper wrapper-content">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>@ViewBag.title</h5> <h5>@ViewBag.title</h5>
@@ -32,7 +32,7 @@
</div> </div>
</div> </div>
<div id="toolbar" class="btn-group"> <div id="toolbar" class="btn-group">
<button id="btn_add" type="button" class="btn btn-outline btn-default" onclick="top.showDialog('addadmins', '添加管理员', '/AdminCP/Member/AddAdmin', 1000, 600)"> <button id="btn_add" type="button" class="btn btn-outline btn-default" onclick="top.showDialog('addadmins', '添加管理员', '/AdminCP/Member/AddAdmin', 0, 0)">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增 <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
</button> </button>
</div> </div>
@@ -2,7 +2,7 @@
@{ @{
ViewBag.title = "查看/编辑管理员"; ViewBag.title = "查看/编辑管理员";
} }
<div class="wrapper wrapper-content animated fadeInRight"> <div class="wrapper wrapper-content ">
<div class="ibox float-e-margins"> <div class="ibox float-e-margins">
<div class="ibox-title"> <div class="ibox-title">
<h5>@ViewBag.Title</h5> <h5>@ViewBag.Title</h5>
@@ -10,7 +10,7 @@
</div> </div>
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "eidtAdminForm", @class = "form-horizontal m-t" })) @using (Html.BeginForm(null, null, FormMethod.Post, new { id = "editAdminForm", @class = "form-horizontal m-t" }))
{ {
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">所属管理组:</label> <label class="col-sm-3 control-label">所属管理组:</label>
+1 -1
View File
@@ -34,7 +34,7 @@ namespace COMCMS.Web.Common
if (string.IsNullOrEmpty(my.Roles.Powers)) if (string.IsNullOrEmpty(my.Roles.Powers))
return false; return false;
IList<AdminMenuEvent> listevents = JsonConvert.DeserializeObject<IList<AdminMenuEvent>>(my.Roles.Powers); IList<AdminMenuEvent> listevents = JsonConvert.DeserializeObject<IList<AdminMenuEvent>>(my.Roles.Powers);
if (listevents == null || listevents.Count > 0) if (listevents == null || listevents.Count <= 0)
{ {
return false; return false;
} }