Skip to content

Commit

Permalink
权限转换由Int32改为UInt32
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueSky-AI committed Aug 21, 2023
1 parent 8e93df9 commit de45b9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions NewLife.CubeNC/Areas/Admin/Views/Role/SetPermission.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,18 @@
foreach (var item in entity.Permissions.OrderBy(e => e.Key))
{
var id = "pf" + entity.ID + "_" + ((Int32)item.Key);
@Html.CheckBox(id, role.Has(entity.ID, (PermissionFlags)item.Key), new { @parentkey = "auth_child" + entity.ID, @proparentkey = "pro_" + item.Key + "_" + entity.ParentID, @prokey = "pro_" + (Int32)PermissionFlags.All + "_" + entity.ParentID, @dataid = entity.ID })
@Html.CheckBox(id, role.Has(entity.ID, (PermissionFlags)item.Key), new { @parentkey = "auth_child" + entity.ID, @proparentkey = "pro_" + item.Key + "_" + entity.ParentID, @prokey = "pro_" + (UInt32)PermissionFlags.All + "_" + entity.ParentID, @dataid = entity.ID })
@Html.Label(id, item.Value)
<text>&nbsp;</text>
}
}
else
{

@Html.CheckBox("pc_readonly_" + entity.ID, false, new { @class = "pro_detail", @prochildkey = "pro_" + (Int32)PermissionFlags.Detail + "_" + entity.ID })
@Html.CheckBox("pc_readonly_" + entity.ID, false, new { @class = "pro_detail", @prochildkey = "pro_" + (UInt32)PermissionFlags.Detail + "_" + entity.ID })
@Html.Label("pc_readonly_" + entity.ID, "只读")
<text>&nbsp;</text>
@Html.CheckBox("pc_all_" + entity.ID, false, new { @class = "pro_all", @prochildkey = "pro_" + (Int32)PermissionFlags.All + "_" + entity.ID })
@Html.CheckBox("pc_all_" + entity.ID, false, new { @class = "pro_all", @prochildkey = "pro_" + (UInt32)PermissionFlags.All + "_" + entity.ID })
@Html.Label("pc_all_" + entity.ID, "全部")
}
</td>
Expand Down
5 changes: 4 additions & 1 deletion NewLife.CubeNC/Areas/Cube/Controllers/AreaController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ protected override IEnumerable<Area> Search(Pager p)
//if (Area.Meta.Count == 0) ThreadPoolX.QueueUserWorkItem(() => Area.FetchAndSave());
// 必须同步初始化,否则无法取得当前登录用户信息
//if (Area.Meta.Count == 0) Area.FetchAndSave();
if (Area.Meta.Count == 0) Import("http://x.newlifex.com/Area.csv.gz", true);

//todo
//if (Area.Meta.Count == 0) Import("http://x.newlifex.com/Area.csv.gz", true);//严重性 代码 说明 项目 文件 行 禁止显示状态 错误 CS7036 未提供与“Area.Import(string, bool, int, bool)”的所需参数“level”对应的参数 NewLife.CubeNC(net6.0), NewLife.CubeNC(net7.0) D:\X\NewLife.Cube\NewLife.CubeNC\Areas\Cube\Controllers\AreaController.cs 54 活动

}

var id = p["id"].ToInt(-1);
Expand Down
6 changes: 3 additions & 3 deletions NewLife.CubeNC/NewLife.CubeNC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NewLife.Core" Version="10.3.2023.511-beta0915" />
<PackageReference Include="NewLife.Core" Version="10.5.2023.801" />
<PackageReference Include="NewLife.IP" Version="2.0.2023.401" />
<PackageReference Include="NewLife.Stardust" Version="2.8.2023.510-beta2330" />
<PackageReference Include="NewLife.XCode" Version="11.8.2023.511-beta0917" />
<PackageReference Include="NewLife.Stardust" Version="2.9.2023.801" />
<PackageReference Include="NewLife.XCode" Version="11.9.2023.801" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit de45b9c

Please sign in to comment.