数据窗体权限:修正AuthorityCategory.ALL_ACTION_VALUE常量定义|C/S框架网
数据窗体权限:修正AuthorityCategory.ALL_ACTION_VALUE常量定义|C/S框架网
扫一扫加作者微信
AuthorityCategory类定义的ALL_ACTION_VALUE常量有BUG,原来的常量相加DATA_ACTION_VALUE+BUSINESS_ACTION_VALUE存在单个权限值重复,导致系统无法进行逻辑“与”运算,修正后参考以下代码:
C# Code:
/// <summary>
/// 所有功能权限(对应ButtonAuthority枚举的所有成员)
/// </summary>
public const int ALL_ACTION_VALUE =
DATA_ACTION_VALUE +
REPORT_ACTION_VALUE +
ButtonAuthority.APPROVAL +
ButtonAuthority.SHOW_MOD_HISTORY +
ButtonAuthority.CLONE +
ButtonAuthority.EXPORT +
ButtonAuthority.GENERATE +
ButtonAuthority.LOCK +
ButtonAuthority.UNDO +
ButtonAuthority.VOID +
ButtonAuthority.RESERVED1 +
ButtonAuthority.RESERVED2 +
ButtonAuthority.EX_01 +
ButtonAuthority.EX_02 +
ButtonAuthority.EX_03 +
ButtonAuthority.EX_04 +
ButtonAuthority.EX_05 +
ButtonAuthority.EX_06 +
ButtonAuthority.EX_07 +
ButtonAuthority.EX_08 +
ButtonAuthority.EX_09 +
ButtonAuthority.EX_10;
//来源:C/S框架网(www.csframework.com) QQ:23404761
/// <summary>
/// 所有功能权限(对应ButtonAuthority枚举的所有成员)
/// </summary>
public const int ALL_ACTION_VALUE =
DATA_ACTION_VALUE +
REPORT_ACTION_VALUE +
ButtonAuthority.APPROVAL +
ButtonAuthority.SHOW_MOD_HISTORY +
ButtonAuthority.CLONE +
ButtonAuthority.EXPORT +
ButtonAuthority.GENERATE +
ButtonAuthority.LOCK +
ButtonAuthority.UNDO +
ButtonAuthority.VOID +
ButtonAuthority.RESERVED1 +
ButtonAuthority.RESERVED2 +
ButtonAuthority.EX_01 +
ButtonAuthority.EX_02 +
ButtonAuthority.EX_03 +
ButtonAuthority.EX_04 +
ButtonAuthority.EX_05 +
ButtonAuthority.EX_06 +
ButtonAuthority.EX_07 +
ButtonAuthority.EX_08 +
ButtonAuthority.EX_09 +
ButtonAuthority.EX_10;
//来源:C/S框架网(www.csframework.com) QQ:23404761
扫一扫加作者微信
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网