public ICollection <PrivacyPolicy> Review(JObject user, JObject resource, JObject environment) { var policies = _privacyPolicyRepository.GetAll(); var result = new List <PrivacyPolicy>(); foreach (var policy in policies) { if (_expressionService.IsPrivacyPolicyRelateToContext(policy, user, resource, environment)) { result.Add(policy); } } return(result); }
public IEnumerable <PrivacyPolicyViewModel> PrivacyPolicy() { var policies = _privacyPolicyRepository.GetAll(); var result = new List <PrivacyPolicyViewModel>(); foreach (var policy in policies) { result.Add(new PrivacyPolicyViewModel() { CollectionName = policy.CollectionName, Description = policy.Description, PolicyId = policy.PolicyId, Target = FunctionUtility.Convert(policy.Target) }); } return(result); }
public DLModel.PrivacyPolicy GetPrivacyPolicyAll(int OrganizationID) { return(_privacyPolicyRepository.GetAll(rk => rk.OrganizationID == OrganizationID).SingleOrDefault()); }