Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Only show cases with IsSensitive=false unless the current user has "View Sensitive Cases" permission
using DovetailCRM.Core.Authorization;
using DovetailCRM.Core.Domain.Workflow;
using FubuFastPack.Querying;
using FubuMVC.Core.Security;
namespace DovetailCRM.Core.Web.Query
{
public class SensitiveCaseDataRestriction : IDataRestriction<Case>
{
public void Apply(IDataSourceFilter<Case> filter)
{
if (!PrincipalRoles.IsInRole(DomainActions.ViewSensitiveCases))
{
filter.WhereEqual(x => x.IsSensitive, false);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.