public bool IsJobApplyAvailable() { List <string> roles = SitefinityHelper.GetCurrentUserRoles(); var roleOptions = JsonConvert.DeserializeObject <List <JobDetailsRolesOptions> >(this.SerializedJobDetailsRoles); List <string> selectedRoles = new List <string>(); foreach (var roleOpt in roleOptions) { if (roleOpt.IsChecked == true) { selectedRoles.Add(roleOpt.RoleName); } } if (roles.Intersect(selectedRoles).Any()) { return(true); } foreach (var roleOpt in roleOptions) { if (roleOpt.RoleName == "Anonymous" && roleOpt.IsChecked == true) { return(true); } } return(false); }