本文整理汇总了C#中iSolutions.iApply.DataContract.Application.IsAssignedTo方法的典型用法代码示例。如果您正苦于以下问题:C# Application.IsAssignedTo方法的具体用法?C# Application.IsAssignedTo怎么用?C# Application.IsAssignedTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iSolutions.iApply.DataContract.Application
的用法示例。
在下文中一共展示了Application.IsAssignedTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsOrganisationEntitled
/// <summary>
/// Returns <see langword="true"/> if the user / session has the correct organisation
/// entitlements to view <paramref name="application"/>, otherwise returns
/// <see langword="false"/>.
/// </summary>
/// <param name="session">The user session.</param>
/// <param name="application">The application.</param>
/// <returns>
/// <see langword="true"/> if the user / session has the correct organisation
/// entitlements to view <paramref name="application"/>, otherwise <see langword="false"/>.
/// </returns>
private bool IsOrganisationEntitled(SecureSession session, Application application)
{
if (session == null || session.AuthenticatedUser == null)
{
// Have to assume public users are entitled to all orgs.
return true;
}
if (session.AuthenticatedUser != null && session.AuthenticatedUser.AccountType == AccountType.Service)
{
return true;
}
// Ignore org entitlements for originator and assignee.
string compareTo = this.GetSessionUserId(session);
if (application.IsCreatedBy(compareTo) || application.IsAssignedTo(compareTo))
{
return true;
}
return !string.IsNullOrEmpty(application.OrganisationId) && session.AuthenticatedUser.GetAllOrganisations().ContainsKey(application.OrganisationId);
}