本文整理汇总了C#中IUser.NullCheck方法的典型用法代码示例。如果您正苦于以下问题:C# IUser.NullCheck方法的具体用法?C# IUser.NullCheck怎么用?C# IUser.NullCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IUser
的用法示例。
在下文中一共展示了IUser.NullCheck方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckUserInAcl
public void CheckUserInAcl(IUser user, IWfProcess process, ref bool continueCheck)
{
user.NullCheck("user");
continueCheck = WfClientContext.IsProcessAdmin(user, process) == false;
if (continueCheck)
continueCheck = WfClientContext.IsProcessViewer(user, process) == false;
}
示例2: IsProcessAdmin
/// <summary>
/// 用户是否是流程管理员
/// </summary>
/// <param name="user"></param>
/// <param name="process"></param>
/// <returns></returns>
public static bool IsProcessAdmin(IUser user, IWfProcess process)
{
user.NullCheck("user");
process.NullCheck("process");
bool result = RolesDefineConfig.GetConfig().IsCurrentUserInRoles(user, "ProcessAdmin");
if (result == false)
result = WfApplicationAuthAdapter.Instance.GetUserApplicationAuthInfo(DeluxeIdentity.CurrentUser).Contains(
process.Descriptor.ApplicationName, process.Descriptor.ProgramName, WfApplicationAuthType.FormAdmin);
return result;
}
示例3: IsProcessViewer
/// <summary>
/// 是否是流程的查看者。本方法仅返回流程分类授权的信息,即使是流程环节中的人,也可能返回为False
/// </summary>
/// <param name="user"></param>
/// <param name="process"></param>
/// <returns></returns>
public static bool IsProcessViewer(IUser user, IWfProcess process)
{
user.NullCheck("user");
process.NullCheck("process");
return WfApplicationAuthAdapter.Instance.GetUserApplicationAuthInfo(DeluxeIdentity.CurrentUser).Contains(
process.Descriptor.ApplicationName, process.Descriptor.ProgramName, WfApplicationAuthType.FormViewer);
}
示例4: CheckUserInAcl
public void CheckUserInAcl(IUser user, IWfProcess process, ref bool continueCheck)
{
user.NullCheck("user");
continueCheck = (RolesDefineConfig.GetConfig().IsCurrentUserInRoles(user, "AdminFormQuery") == false);
}