public IEnumerable<EntityType> GetReportableEntities(Person currentPerson)
{
return this.GetEntities()
.Where( a => a.IsAuthorized( Rock.Security.Authorization.VIEW, currentPerson ) )
.Select( s => new
{
EntityTypeCache = Rock.Web.Cache.EntityTypeCache.Read( s ),
Entity = s,
} )
.Where( a => a.EntityTypeCache != null && a.EntityTypeCache.GetEntityType() != null && !a.EntityTypeCache.GetEntityType().GetCustomAttributes( typeof( HideFromReportingAttribute ), true ).Any() )
.Select( s => s.Entity );
}