Ejemplo n.º 1
0
        async Task <BooleanExpression> ITableResolver.GetRowLevelSecurity(HttpContext httpContext)
        {
            HttpContext = httpContext;

            //Create the builder
            var builder = RowLevelSecurityContext.Create <T>();

            //Allow user to add their expressions
            await ApplyRowLevelSecurity(builder);

            //Build the sql tree with the expressions
            return(builder.Build());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Override to create an expression given the current user in the http context that will limit the users visibility.
 ///
 /// This does not contain query information since it can be called standalone without a query.
 /// </summary>
 /// <param name="builder"></param>
 /// <returns></returns>
 protected virtual Task ApplyRowLevelSecurity(RowLevelSecurityContext <T> context)
 {
     return(Task.CompletedTask);
 }