增加view里面判断权限的方法
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
@{
|
||||
ViewBag.title = "添加管理员";
|
||||
}
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.title</h5>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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>新增
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@{
|
||||
ViewBag.title = "查看/编辑管理员";
|
||||
}
|
||||
<div class="wrapper wrapper-content animated fadeInRight">
|
||||
<div class="wrapper wrapper-content ">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>@ViewBag.Title</h5>
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<label class="col-sm-3 control-label">所属管理组:</label>
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace COMCMS.Web.Common
|
||||
if (string.IsNullOrEmpty(my.Roles.Powers))
|
||||
return false;
|
||||
IList<AdminMenuEvent> listevents = JsonConvert.DeserializeObject<IList<AdminMenuEvent>>(my.Roles.Powers);
|
||||
if (listevents == null || listevents.Count > 0)
|
||||
if (listevents == null || listevents.Count <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user